...
In Camel 2.10 or earlier, Camel will perform redelivery while stopping a route, or shutting down Camel. This has improved a bit in Camel 2.10 onwards, as Camel will not perform redelivery attempts when shutting down aggressively (eg during Graceful Shutdown and timeout hit). From Camel 2.11 onwards there is a new option redeliverWhileStopping
allowRedeliveryWhileStopping
which you can use to control if redelivery is allowed or not; notice that any in progress redelivery will still be executed. This option can only disallow any redelivery to be executed after the stopping of a route/shutdown of Camel has been triggered. If a redelivery is dissallowed then a RejectedExcutionException
is set on the Exchange and the processing of the Exchange stops. This means any consumer will see the Exchange as failed due the RejectedExecutionException
.
The default value is true
to be backwards compatible as before. For example the following sample shows how to do this with Java DSL and XML DSL
...