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: Loadbalance failover with recipientList
Date Thu, 02 Feb 2012 10:19:30 GMT
Hi

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
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html



On Thu, Feb 2, 2012 at 9:57 AM, tan <tanblin@stee.stengg.com> 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: http://camel.465427.n5.nabble.com/Loadbalance-failover-with-recipientList-tp5450056p5450056.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
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