camel-users mailing list archives

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

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
broker.

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
<javaxmlsoapdev@yahoo.com> 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: http://camel.465427.n5.nabble.com/Aggregator-from-JMS-endpoints-tp5657471p5657471.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message