-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Add SQS transport #32454
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
Conversation
453a19d
to
6d4de47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice PR and a very useful feature. Thanks Jérémy. I left some very minor comments.
src/Symfony/Component/Messenger/Transport/SqsExt/Connection.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Transport/SqsExt/Connection.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Transport/SqsExt/Connection.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Transport/SqsExt/Connection.php
Outdated
Show resolved
Hide resolved
To me we should prioritize finalizing the messenger API for 4.4 and fixing all the open messenger problems. So adding another transport should come after that. |
I don't want that to block this PR... as we won't be 100% sure of API changes until feature freeze for 4.4. I think we should push this forward. |
src/Symfony/Component/Messenger/Transport/SqsExt/Connection.php
Outdated
Show resolved
Hide resolved
4949046
to
8907adc
Compare
I'm also for merging this PR rather sooner than later, so that when we evolve the code for 4.4 stabilization, it can be included as well in the changes. |
src/Symfony/Component/Messenger/Transport/Receiver/DisconnectedReceiverInterface.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Transport/Receiver/DisconnectedReceiverInterface.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Transport/SqsExt/Connection.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/SqsExt/SqsExtIntegrationTest.php
Outdated
Show resolved
Hide resolved
ac6e397
to
bdafae5
Compare
sqs has first class support for 'failures', dead letter queues. is it possible to support them somehow? |
@bendavies In this PR I included the minimal features required by Messenger. I think that behaviors like FIFO, Deadletter, could be added in dedicated PR |
src/Symfony/Component/Messenger/Transport/SqsExt/Connection.php
Outdated
Show resolved
Hide resolved
bdafae5
to
722315d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im happy with this PR. Great work!
Could you rebase your PR to get rid of the Doctrine related changes?
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsSender.php
Outdated
Show resolved
Hide resolved
bf7f60c
to
86ffde5
Compare
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php
Outdated
Show resolved
Hide resolved
@jderusse Can you finish this one so that it can be merged? Ping me when it's done :) Thank you. |
86ffde5
to
5c7d8fb
Compare
5c7d8fb
to
c226479
Compare
Looks good to me. |
@jderusse Is it ready on your side? Perhaps a last rebase before merging? |
yes it's ok for me |
I noticed that the namespaces are at odds with This namesapce could be |
Excellent point. However, I think |
Sure, but my point is that, that's not how mailer has done it. all impls are in one |
In my opinion,the difference is AWS provides a single mailing service but several messaging services. (SQS, SNS, Kinesis). |
Thank you @jderusse. |
This PR was merged into the 5.1-dev branch. Discussion ---------- [Messenger] Add SQS transport | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | TODO This PR add the AWS SQS transport in messenger. It also add a `DisconnectedReceiverInterface` that allows the worker to release not-proceeded message (which are not automatically released in SQS and have to wait a TTL). Tell me if you prefer to move it in a dedicated PR. accepted DNS: - `sqs://default/accountId/queueName` - `sqs://default/queueName` - `sqs://default/queueName?region=us-east-2` - `sqs://my_custome_endpoint:12345/queueName?sslmode=disabled` To reduce AWS costs, the implementation performs a long polling call and prefetch several messages. TO get ~real time worker, one could use `./bin/console messenger:consume --sleep 0.001` Commits ------- c226479 [Messenger] Add SQS transport
How are we on the docs on this? Can I do anything to help? |
Yes please. There is an issue symfony/symfony-docs#13093 for that. I'll be happy to help reviewing if you create content. Let's discuss further on symfony/symfony-docs#13093 EDIT: I see that there is already an open PR: symfony/symfony-docs#13328 @tomcoonen could you help review that? |
This PR add the AWS SQS transport in messenger.
It also add a
DisconnectedReceiverInterface
that allows the worker to release not-proceeded message (which are not automatically released in SQS and have to wait a TTL). Tell me if you prefer to move it in a dedicated PR.accepted DNS:
sqs://default/accountId/queueName
sqs://default/queueName
sqs://default/queueName?region=us-east-2
sqs://my_custome_endpoint:12345/queueName?sslmode=disabled
To reduce AWS costs, the implementation performs a long polling call and prefetch several messages.
TO get ~real time worker, one could use
./bin/console messenger:consume --sleep 0.001