Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Messenger] [Sqs] AddAddFifoStamp
middleware#48095
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
8c0a310
to161d613
Comparecarsonbot commentedNov 4, 2022
Hey! I think@filkaris has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
Hello there ! I'll have some time soon to write some documentation but I'd like to be sure that the feature is interesting :D |
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.
Thank you
I like this PR.
What are the pros/cons to use one interface instead of two? (and make the return type nullable)
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Middleware/WithMessageGroupId.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
tyx commentedOct 18, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@Nyholm ! In fact, deduplication is "optionnal" in sqs world. For example in our situation we rarely use it. According to the documentation
So 2 interfaces reduce the boilercode to write by the end user (aka empty method deduplicationId) |
Yeah, true. Thank you Please add a doc block and I am super happy with this PR. |
161d613
toca2d0d7
Comparesrc/Symfony/Component/Messenger/Bridge/AmazonSqs/Middleware/WithMessageGroupId.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
AddFifoStamp
middlewareAddFifoStamp
middlewareAddFifoStamp
middlewareThere 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.
Can you please add a before/after to the description of your PR? How can one do today, and your proposal?
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Middleware/AddFifoStamp.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Middleware/AddFifoStampTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Middleware/AddFifoStampTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Middleware/AddFifoStampTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Middleware/AddFifoStampTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Middleware/AddFifoStampTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Middleware/AddFifoStampTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Middleware/AddFifoStampTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Middleware/WithMessageDeduplicationId.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Middleware/AddFifoStamp.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Middleware/AddFifoStamp.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...ny/Component/Messenger/Bridge/AmazonSqs/Middleware/SupportsMessageDeduplicationInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
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.
One minor comment and GTM!
...mfony/Component/Messenger/Bridge/AmazonSqs/Middleware/MessageDeduplicationAwareInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...mfony/Component/Messenger/Bridge/AmazonSqs/Middleware/MessageDeduplicationAwareInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Middleware/AddFifoStamp.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...mfony/Component/Messenger/Bridge/AmazonSqs/Middleware/MessageDeduplicationAwareInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedOct 19, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
One last thing: please update the PR description to show how the middleware could be enabled. |
fe008fa
to707b5a4
CompareThis PR was merged into the 6.4 branch.Discussion----------DX: nullable_type_declaration| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | no| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets | n/a| License | MIThttps://cs.symfony.com/doc/rules/language_construct/nullable_type_declaration.html#example-1requested in#48095 (comment)I do not put this rule in ruleset, as it requires PHP 8 - if you want to move it to ``@Symfony`` ruleset, let me knowThere is concern how to have this rule configured and have PHPUnit bridge supporting 7.4, but I think I will leave it unresolved for now.Commits-------6aff9d9 DX: nullable_type_declaration
707b5a4
toc424da4
CompareThank you@tyx. |
Uh oh!
There was an error while loading.Please reload this page.
Currently it is not very easy to use fifo stamp as you need to go down to the envelope when you often handle only message in your app.
We also think that the message should be responsible to choose its own groupId.
So we come with this very simple middleware and 2 interfaces. We use it in our own system since 3 months.
It allows to keep messenger concept outside our messages while continuing to benefit from it.
Example
To group message by user for example
Current
After
Usage
It can be enabled with this kind of config