-
Notifications
You must be signed in to change notification settings - Fork 128
[WIP] Middleware for automatic retrying failed jobs #77
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
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.
Instead of doing this it needs to save the given Message. This is because when it is retried and sent to a Receiver that Receiver can have a typehint on that className also it makes it transparent when moving it back from a failures queue (just unwrap the Message and give it to the producer again).
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.
Ok, but how do I keep track of the retryCount then?
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.
new FailureMessage($message, $previous->getRetries() + 1);
|
For a start we could just allow up to 5 retries, and if they exceed that it should be moved or just ignored? Other than that. There is missing Serializer support for JMS Serializer, Symfony and the NaiveSerializer. |
|
Hey @ruudk still interested in this one ? We might have a way cleaner way of doing this in the near future. |
|
Yes, that it would be awesome to have this kind of support in Bernard. The only reason why I'm not using it at the moment. |
|
Would you mind looking at the Event and Batch Pull Requests, which would make this easy to achieve together with a custom Storage for retry messages? |
|
That looks awesome. Unfortunately I don't have time to work on this. |
|
Thats completely okay, i will pick it up when the others have been figured out. Thanks for input :) |
|
This is obsolete, closing. |
I'm trying to implement a middleware that allows you to automatic retry failed jobs.
Maybe it would be better to combine this feature inside the FailedMiddleware with a config option. Default = only 1 list of failed jobs. But optional you can specify a retry strategy.
Inspiration: Sidekiq Retry_job middleware