-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Add bury_on_reject
option to Beanstalkd bridge
#49652
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d27f62e
to
3243a9f
Compare
bury_on_reject
option to Beanstalkd bridgepriority
and bury_on_reject
options to Beanstalkd bridge
priority
and bury_on_reject
options to Beanstalkd bridgebury_on_reject
option and BeanstalkdPriorityStamp
to Beanstalkd bridge
17fbade
to
ee0db6a
Compare
@X-Coder264 Could you please give this a glance since you originally worked on this transport implementation? |
X-Coder264
approved these changes
Jun 30, 2023
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.
@spideyfusion The implementation looks good to me 👍
235b83f
to
669a8bf
Compare
c6ec2c9
to
64e02ec
Compare
rebased ✅ |
f933998
to
7987d87
Compare
a340de0
to
c66a791
Compare
6a9a57c
to
9197b0b
Compare
9197b0b
to
d03cbd3
Compare
bury_on_reject
option and BeanstalkdPriorityStamp
to Beanstalkd bridgebury_on_reject
option to Beanstalkd bridge
b706a44
to
4ca177e
Compare
fabpot
added a commit
that referenced
this pull request
Jan 5, 2025
…d bridge (HypeMC) This PR was merged into the 7.3 branch. Discussion ---------- [Messenger] Add `BeanstalkdPriorityStamp` to Beanstalkd bridge | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | - | License | MIT Extracted from #49652 as the original PR was trying to do two separate things in one. Beanstalkd has the ability to configure the priority at which messages are reserved. This can now be set using the `BeanstalkdPriorityStamp`: ```php $this->bus->dispatch(new SomeMessage('some data'), [ new BeanstalkdPriorityStamp(0), ]); ``` Commits ------- 9926d59 [Messenger] Add BeanstalkdPriorityStamp to Beanstalkd bridge
e1bf105
to
23017dc
Compare
fabpot
reviewed
Jan 25, 2025
2824fcb
to
bc7dc5d
Compare
fabpot
approved these changes
Jan 27, 2025
Thank you @HypeMC. |
bc7dc5d
to
9f4b8a4
Compare
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contains #59273.This PR adds two improvements to the Beanstalkd bridge:Beanstalkd has the concept of "buried" jobs, which is a way of denoting that something has gone wrong while the consumer was processing the job. This PR adds a
bury_on_reject
option to bury rejected messages instead of deleting them, which is the current behavior. Since Symfony messenger's retry mechanism sends a new message for each retry and rejects the old one, it would create multiple buried jobs for each failed one. To avoid this issue aSentForRetryStamp
was added to identify whether a failed message was sent for retry or not. As long as the retry mechanism keeps sending a new message, the old one will be deleted. Once it finishes, the final rejected message will be buried.Extracted to [Messenger] Add
BeanstalkdPriorityStamp
to Beanstalkd bridge #59273