[Messenger][FrameworkBundle] Allow chaining multiple failure transports #58655
+137
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.