-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When queue is aws fifo (name needs to end with .fifo) and push notification is true, sns topic cant be created #131
Comments
Hey Guys, Also on this matter, even applying the fix above i could not receive the message on my service using the fifo queue. In the AwsProvider.php publish method there is a return $result->get('MessageId'); on line 232 that is stoping the method when push_notifications is true. I have commented out the line 232 and was able to receive the message on my endpoint. Thank you! |
Hi @GuilhermeMoura1 , Unfortunately I believe this is a limitation of SQS, not this bundle:
|
Hi @danmurf, Guess i am a bit confused now. So are you telling me that this return in the $this->sqs->sendMessage on line 256 is intentional. Then our endpoint receive the notification and from what i could understand in the code, it calls SQS And as amazon says that fifo queues can not receive the message from automatically SNS we cant use push_notification alongside fifo queues in this bundle right? |
Hi GuilhermeMoura1, that's my understanding (that you can't use I've created a PR to update the docs so that others are aware of this: #134 |
The error ive got is:
InvalidParameter
Invalid parameter: Topic Name
I have debugged and saw that the method getNameWithPrefix of AbstractProvider.php should have a way to preserve the ".fifo" extension to be used in the sqs queue create method, QueueName parameter
Did quick adjustment just make it pass, maybe you will find more elegant solution.
public function getNameWithPrefix($removeFifoExtension=true)
{
if (!empty($this->options['queue_name'])) {
if($removeFifoExtension) {
return str_replace('.fifo', '', $this->options['queue_name']);
} else {
return $this->options['queue_name'];
}
}
return sprintf("%s_%s", self::QPUSH_PREFIX, $this->name);
}
Then in AwsProvider.php file in line 405 add the false parameter preserve fifo extension in aws sqs queue name creation
$result = $this->sqs->createQueue(['QueueName' => $this->getNameWithPrefix(false), 'Attributes' => $attributes]);
Hope you can incorporate this to the project soon, thank you the bundle looks very good!
The text was updated successfully, but these errors were encountered: