-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Add option to stop the worker after a message failed #35453
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
Hey, is there any chance this will be merged into 4.4 still? Current milestone seems to be 5.1. |
@flaushi : new features are never merged to already released branches. |
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.
I like this feature.
It is a good way to "just stop everything and start over" when something is wrong with the current process.
Could you rebase the PR please?
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.
I like this - it seems like a sound option. We have had workers get into an "invalid" state for one reason or another (not commonly, but it has happened) and having the ability for a worker to exit if it's having too much trouble seems nice to me.
Thank you @micheh. |
I don't understand, how is it supposed to work? When doctrine throws an exception, EntityManager closes and we get a new message in the queue and then handler tries to process it again and fails with same error, then handler stops when reaches -failure-limit and then restores by supervisor. And then handler again gets same message that throws the same error. |
As i understand, after several retries your failed message will be sended to failure transport (or skipped if failure transport is not configured) |
This pull request adds a new option to the
messenger:consume
command, to stop the worker after a specified amount of failed messages was handled by the worker.