camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Aggregator from JMS endpoints
Date Mon, 23 Apr 2012 06:29:49 GMT

You can use JMS transacted acknowledge mode  (eg setting
transacted=true) on the jms component.
Then in if the processing of the message fails then the message will
not be ack and it will be kept on the queue and redelivered by the JMS

You can then configure Camel's error handler / onException to use
maximumRedeliveries = 3, and maybe put some delays between so it waits
X seconds between redelivery attempts.

On Sun, Apr 22, 2012 at 3:48 PM, javaxmlsoapdev
<> wrote:
> Hello,
> I am just starting to learn camel and stumbled upon a question for a use
> case that I am dealing with. I need to design a route which consumes
> messages from one JMS queue (call it a activeMQ.queue.sourceQueue) and
> dispatched to multiple destination queues (call them
> activeMQ.queue.destination1, activeMQ.queue.destination2 etc). sure will
> there be intermediate processing/business logic etc before forwarding to the
> destination queues.
> Now when publishing to one of the JMS destination(queue) fails (let's say
> there were two and one failed), then I want camel to retry it(redeliver) for
> 3 times before raising an exception. In this scenario publishing to another
> queue was successful but 1st queue failed so aggregator should return false
> or throw an exception for first JMS source endpoint to keep the message in
> the source queue(or error queue). which will be picked up again at a later
> point of time and go through the same logic/route etc.
> I am not sure how to design such aggregator which publishes to JMS queues
> and gather exceptions/success etc?
> Another question is how can we scale this aggregator since potentially we'll
> be dealing with millions of messages.
> Any help/pointers/samples are appreciated.
> Thanks,
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
CamelOne 2012 Conference, May 15-16, 2012:
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message