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][FrameworkBundle] Allow chaining multiple failure transports#58655
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
base:7.4
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedOct 24, 2024
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
This would be very useful when using a transport which gets messages from outside the app ("readonly transport") where you can't push any retries to the original transport. For example this 👇 and then have consumers on framework:messenger:transports:events:dsn:'kafka://'retry_strategy:max_retries:0failure_transport:retryretry:dsn:'doctrine://?queue=retry'failure_transport:failedfailed:'doctrine://?queue=failed' |
6a73ecf
to3ed488c
Compare3ed488c
to7a374be
Compare7a374be
to90e25c9
Compare90e25c9
to0a0cb5a
CompareIs there any feedback if this PR will be reviewed or closed? |
5762219
to6fa2ded
Compare6fa2ded
toc3ea3c4
Compare
Uh oh!
There was an error while loading.Please reload this page.
This adds the ability to chain multiple failure transports together.
If a message fails, it will be redispatched to the configured failure transport. Until now, this could only happen once, as each envelope could only have one
SentToFailureTransportStamp
. This limitation got removed, allowing an envelope to fail and be redispatched to the failure transport multiple times. To prevent endless dispatch loops, an envelope does not get redispatched if it had already been dispatched to the same transport.Let's say we have the following transports:
A message dispatched to
transport_1
would fail and be redispatched totransport_2
. If it fails again intransport_2
(after the configured retry strategy etc.), it would then be redispatched tofailure_transport_1
.All "intermediate" failure transports (i.e. those that a have failure transport themselves) do not get tagged as failure transports. This way they will now show up in the
messenger:failed:*
commands.