camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tan <tanb...@stee.stengg.com>
Subject Loadbalance failover with recipientList
Date Thu, 02 Feb 2012 08:57:02 GMT
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: http://camel.465427.n5.nabble.com/Loadbalance-failover-with-recipientList-tp5450056p5450056.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message