camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Loadbalance failover with recipientList
Date Thu, 02 Feb 2012 10:19:30 GMT

Try using the dynamic router EIP instead of routing slip.
Then you can failover in the dynamic logic. And remember to return
null, from the dynamic router, when you are done routing.

Alternatively you can failover and have the recipient list as the 2nd,
eg see this FAQ

On Thu, Feb 2, 2012 at 9:57 AM, tan <> wrote:
> Hi, I would like to know if loadBalance is able to failover to a dynamic
> destination using recipientList or routingSlip?
> I'm using Camel 2.4.0 pointing to 2 JBoss AS 5.1. My program is supposed to
> check the contents of a file and route it to the specified site's JBoss. If
> that site's primary JBoss dies, then it should route to the secondary JBoss.
> My routing slip is below:
> from("file://c:/test)
> .routingSlip(SLIP_HEADER)
> .loadBalance(new
> FailoverProcessor()).failover(1,false,false,JMSException.class)
> .routingSlip(SLIP_HEADER)
> The first routing slip is to route dynamically to a site. If connection
> fails, the FailoverProcessor will update the SLIP_HEADER to the site's
> secondary route.
> It only works if I define the endpoint statically but it's not what I need:
> from("file://c:/test)
> .routingSlip(SLIP_HEADER)
> .loadBalance().failover(1,false,false,JMSException.class)
> .to(primary_jms).to(secondary_jms)
> Thanks a lot for the help.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message