Skip to content

Conversation

@ruudk
Copy link
Contributor

@ruudk ruudk commented Sep 19, 2013

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

Copy link
Contributor

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).

Copy link
Contributor Author

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?

Copy link
Contributor

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);

@henrikbjorn
Copy link
Contributor

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.

@henrikbjorn
Copy link
Contributor

Hey @ruudk still interested in this one ? We might have a way cleaner way of doing this in the near future.

@ruudk
Copy link
Contributor Author

ruudk commented Feb 17, 2014

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.

@henrikbjorn
Copy link
Contributor

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?

@ruudk
Copy link
Contributor Author

ruudk commented Feb 17, 2014

That looks awesome. Unfortunately I don't have time to work on this.

@henrikbjorn
Copy link
Contributor

Thats completely okay, i will pick it up when the others have been figured out. Thanks for input :)

@henrikbjorn
Copy link
Contributor

This is obsolete, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants