-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] extract worker logic to listener and get rid of SendersLocatorInterface::getSenderByAlias #34185
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
72f2480
to
3a2672f
Compare
use Symfony\Component\Messenger\Transport\Sender\SendersLocator; | ||
use Symfony\Component\Messenger\Worker; | ||
|
||
class RetryIntegrationTest extends TestCase |
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.
fully covered by FailureIntegrationTest
3a2672f
to
4b5547a
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.
Absolutely wonderful.
This removes some "evil" (added by me 👿) without any downside that I can see. It's simply a cleaner implementation - moving several "special cases" like the RedeliveryStamp
handling - out of core classes like Worker
and SendMessageMiddleware
and into event listeners.
src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php
Show resolved
Hide resolved
src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php
Show resolved
Hide resolved
src/Symfony/Component/Messenger/EventListener/SendFailedMessageToFailureTransportListener.php
Show resolved
Hide resolved
src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Command/AbstractFailedMessagesCommand.php
Outdated
Show resolved
Hide resolved
4b5547a
to
71a18ac
Compare
and failure directly to transport instead of redispatching on the bus
71a18ac
to
d7e0f98
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.
+1
Test failures match failures on current 4.4 or things that should resolve after merge afaik (like FWBundle from this PR failing against symfony/messenger:dev-master due to a class added in this PR missing).
…id of SendersLocatorInterface::getSenderByAlias (Tobion) This PR was merged into the 4.4 branch. Discussion ---------- [Messenger] extract worker logic to listener and get rid of SendersLocatorInterface::getSenderByAlias | Q | A | ------------- | --- | Branch? | 4.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 | Fix #32077 and #31848 | License | MIT | Doc PR | as discussed with @weaverryan sending messages for retry and failure directly to transport instead of redispatching on the bus makes things much cleaner Commits ------- d7e0f98 [Messenger] extract worker logic to listener and sent messages for retry and failure directly to transport instead of redispatching on the bus
The test |
It's getting fixed in #34217 |
as discussed with @weaverryan sending messages for retry and failure directly to transport instead of redispatching on the bus makes things much cleaner