Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 17D4A9944 for ; Thu, 2 Feb 2012 10:20:37 +0000 (UTC) Received: (qmail 70534 invoked by uid 500); 2 Feb 2012 10:20:35 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 69548 invoked by uid 500); 2 Feb 2012 10:20:19 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 69494 invoked by uid 99); 2 Feb 2012 10:20:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 10:20:16 +0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lpp01m020-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 10:20:11 +0000 Received: by lbbgf7 with SMTP id gf7so405614lbb.32 for ; Thu, 02 Feb 2012 02:19:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=vAuoVTVXuhzL2I0q82p4cq6xvmvgfCpD4cw81PwU0ZM=; b=YyjdxoaLE4si+E+z8QW+P9oJtHdaESj5xxcv4a5WwThCd21uYAxUpACp2rWfOG0K5N CrmRzA1FaohOT/V593ugXUOByoQ19sylEsGrfBuhJ6nOxwy25YGBsMweGVol6H9x+lN+ ky3TukjaWRxViqB2dQH5wpA18IQl1U85sgaFY= Received: by 10.112.84.170 with SMTP id a10mr597696lbz.22.1328177990256; Thu, 02 Feb 2012 02:19:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.10.68 with HTTP; Thu, 2 Feb 2012 02:19:30 -0800 (PST) In-Reply-To: <1328173022311-5450056.post@n5.nabble.com> References: <1328173022311-5450056.post@n5.nabble.com> From: Claus Ibsen Date: Thu, 2 Feb 2012 11:19:30 +0100 Message-ID: Subject: Re: Loadbalance failover with recipientList To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 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 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/