|
Hi Camel Experts -
I have a route that uses the HTTP component to call a web service. If the HTTP component returns "org.apache.camel.component.http.HttpOperationFailedException", then the <onException> definition specifies to attempt redeliveries. The RedeliveryPolicy specifies a redelivery delay of 15 seconds, a maximum redeliveries of 480, for a total wait time of 2 hours. <onException> <exception>org.apache.camel.component.http.HttpOperationFailedException</exception> <redeliveryPolicy redeliveryDelay="15000" maximumRedelivers="480" /> <handled> <constant>true</constant> </handled> </onException> The problem is on shutdown. The Camel shutdown flow will wait for any inflight messages that are in the "redelivery loop" to complete, which of course can be several hours. We want to be able to shutdown the component in a much shorter time without the long wait, gracefully. QUESTION: Is there a way to terminate the redelivery of the messages when Camel is shutdown? Thanks, -Craig LaSalle |
|
Hi
This has been improved in Camel 2.9.1 onwards https://issues.apache.org/jira/browse/CAMEL-4950 - Graceful Shutdown is now more aggressive if timeout occurred during shutdown, rejecting continued processing of messages or redeliveries. There is a default timeout of 5 minutes in the graceful shutdown. You can customize this, for example to a lower value. Then Camel shutdown will force a shutdown when the timeout is hit. http://camel.apache.org/graceful-shutdown.html On Wed, Jun 20, 2012 at 9:21 PM, CraigLaSalle <[hidden email]> wrote: > Hi Camel Experts - > > I have a route that uses the HTTP component to call a web service. If the > HTTP component returns > "org.apache.camel.component.http.HttpOperationFailedException", then the > <onException> definition specifies to attempt redeliveries. > > The RedeliveryPolicy specifies a redelivery delay of 15 seconds, a maximum > redeliveries of 480, for a total wait time of 2 hours. > > <onException> > > <exception>org.apache.camel.component.http.HttpOperationFailedException</exception> > <redeliveryPolicy redeliveryDelay="15000" > maximumRedelivers="480" /> > <handled> > <constant>true</constant> > </handled> > </onException> > > The problem is on shutdown. The Camel shutdown flow will wait for any > inflight messages that are in the "redelivery loop" to complete, which of > course can be several hours. We want to be able to shutdown the component in > a much shorter time without the long wait, gracefully. > > QUESTION: Is there a way to terminate the redelivery of the messages when > Camel is shutdown? > > Thanks, > -Craig LaSalle > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Stopping-long-redelivery-on-Camel-shutdown-tp5714773.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: [hidden email] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen |
|
Excellent. I'll try it out. Thank you!
|
|
Thanks again, it worked like a charm.
|
| Powered by Nabble | Edit this page |
