Skip to content
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

Graceful Shutdown #131

Open
Rajh opened this issue Oct 8, 2018 · 1 comment
Open

Graceful Shutdown #131

Rajh opened this issue Oct 8, 2018 · 1 comment

Comments

@Rajh
Copy link

Rajh commented Oct 8, 2018

Is it possible to stop retries when the application is shutting down ?
When configuring retry for a long period of time, it blocks the application shutdown until every retries are finished.

In my case, I'm using a JMS listener, which is closed after 30 seconds, but @Retryable annotation keeps retrying message, which even if the process would have succeed, won't be able to commit the JMS ack.

@dsyer
Copy link
Member

dsyer commented Nov 8, 2018

My understanding is that on shutdown the listener threads should be interrupted, and that would be picked up by the backoff policy at the end of the current backoff. So it shouldn't be the case that "every retry" has to finish - they just all have to get to the next attempt. If your backoffs can be longer than 30s, then you probably need to adjust the timeout in the listener container.

Stateful retry is probably better for JMS (then you won't block during the retry).

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

No branches or pull requests

2 participants