You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Marco Westermann <Ma...@gmx.de> on 2013/07/23 09:12:28 UTC

error handling async instead of sync

Hi,

I have a route with an errorHandler configured. I set it to redeliver 
async. But when an error occures the remaining messages on the queue are 
processed after the redelivery of the failed message ends.

Here is my routebuilder: http://pastebin.com/8fUED75R

Is there something wrong with it? I use camel 2.10.4

the process method which is invoked from the route logs a line: 
processing new order 123123
and my log looks like this: http://pastebin.com/iLE6MqJJ

why is my redelivery sync instead of async?

best regards,

Marco

Re: error handling async instead of sync

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You have to set asyncConsumer=true on the JMS endpoint.

See details at
http://camel.apache.org/jms

On Tue, Jul 23, 2013 at 9:12 AM, Marco Westermann <Ma...@gmx.de> wrote:
> Hi,
>
> I have a route with an errorHandler configured. I set it to redeliver async.
> But when an error occures the remaining messages on the queue are processed
> after the redelivery of the failed message ends.
>
> Here is my routebuilder: http://pastebin.com/8fUED75R
>
> Is there something wrong with it? I use camel 2.10.4
>
> the process method which is invoked from the route logs a line: processing
> new order 123123
> and my log looks like this: http://pastebin.com/iLE6MqJJ
>
> why is my redelivery sync instead of async?
>
> best regards,
>
> Marco



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: error handling async instead of sync

Posted by Raul Kripalani <ra...@evosent.com>.
You can add the concurrentConsumers option to the JMS consumer. Camel
will then keep consuming messages in other threads even if the first
one is busy doing the redeliveries.

Alternatively, you can configure broker-side redeliveries in AMQ is
you want async behavior. In that case, you should not handle the
exception in Camel so that it propagates back to the broker.

- Raúl.

On 23 Jul 2013, at 08:12, Marco Westermann <Ma...@gmx.de> wrote:

> Hi,
>
> I have a route with an errorHandler configured. I set it to redeliver async. But when an error occures the remaining messages on the queue are processed after the redelivery of the failed message ends.
>
> Here is my routebuilder: http://pastebin.com/8fUED75R
>
> Is there something wrong with it? I use camel 2.10.4
>
> the process method which is invoked from the route logs a line: processing new order 123123
> and my log looks like this: http://pastebin.com/iLE6MqJJ
>
> why is my redelivery sync instead of async?
>
> best regards,
>
> Marco