Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Open
Ocarthon wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromOcarthon:feat/messenger-failure-chain

Conversation

Ocarthon
Copy link

@OcarthonOcarthon commentedOct 24, 2024
edited
Loading

QA
Branch?7.3
Bug fix?no
New feature?no
Deprecations?no
Issues
LicenseMIT

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 oneSentToFailureTransportStamp. 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:

framework:messenger:transports:transport_1:dsn:'null://'failure_transport:transport_2transport_2:dsn:'null://'failure_transport:failure_transport_1failure_transport_1:'null://'

A message dispatched totransport_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 themessenger:failed:* commands.

valtzu and norkunas reacted with thumbs up emoji
@carsonbot
Copy link

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:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.2 branch.

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!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@valtzu
Copy link
Contributor

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 onevents &retry.

framework:messenger:transports:events:dsn:'kafka://'retry_strategy:max_retries:0failure_transport:retryretry:dsn:'doctrine://?queue=retry'failure_transport:failedfailed:'doctrine://?queue=failed'

@OcarthonOcarthonforce-pushed thefeat/messenger-failure-chain branch from6a73ecf to3ed488cCompareOctober 28, 2024 07:32
@OcarthonOcarthonforce-pushed thefeat/messenger-failure-chain branch from3ed488c to7a374beCompareNovember 7, 2024 07:54
@fabpotfabpot modified the milestones:7.2,7.3Nov 20, 2024
@OcarthonOcarthonforce-pushed thefeat/messenger-failure-chain branch from7a374be to90e25c9CompareDecember 9, 2024 14:12
@OcarthonOcarthon changed the title[Messenger] Allow chaining multiple failure transports[Messenger][FrameworkBundle] Allow chaining multiple failure transportsDec 13, 2024
@OcarthonOcarthonforce-pushed thefeat/messenger-failure-chain branch from90e25c9 to0a0cb5aCompareJanuary 30, 2025 08:09
@Ocarthon
Copy link
Author

Is there any feedback if this PR will be reviewed or closed?

@OcarthonOcarthonforce-pushed thefeat/messenger-failure-chain branch 2 times, most recently from5762219 to6fa2dedCompareMarch 1, 2025 17:11
@OcarthonOcarthonforce-pushed thefeat/messenger-failure-chain branch from6fa2ded toc3ea3c4CompareMay 6, 2025 09:54
@fabpotfabpot modified the milestones:7.3,7.4May 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

4 participants
@Ocarthon@carsonbot@valtzu@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp