OK After some debugging and scanning of the source code, I found that Camel uses spring MessageListenerContainers. AbstractMessageListenerContainer, in case of CLIENT_AKNOWLEDGE mode, calls the comitIfNecessary message confirmation method. This only happens after a registered MessageListener successfully completes the process (no exceptions)
Camel uses an EndpointMessageListener, which, in the end, calls the processing method of the next processor (or Producer) along the route. Since this is a classic chain of responsibility, if any processor along the route throws an exception or sets an exception on Exchange, it will restart the EndpointMessageListener, preventing the AbstractMessageListener from being notified.
source share