Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 53500 invoked from network); 5 Mar 2009 09:52:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Mar 2009 09:52:20 -0000 Received: (qmail 56053 invoked by uid 500); 5 Mar 2009 09:52:18 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 56030 invoked by uid 500); 5 Mar 2009 09:52:18 -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 55981 invoked by uid 99); 5 Mar 2009 09:52:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2009 01:52:18 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.168 as permitted sender) Received: from [209.85.218.168] (HELO mail-bw0-f168.google.com) (209.85.218.168) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2009 09:52:09 +0000 Received: by bwz12 with SMTP id 12so3198060bwz.20 for ; Thu, 05 Mar 2009 01:51:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ZBPn269xzSjInKZ8hjWdhcJYDVYvYrPVhuJtqc+D9Ss=; b=ohHxwCaO52lF0/g2jycmrc1Pc58WahaR6TLVrEjcUsZlTaW44mQohHEi1cQQbJhYfV alexDmFNRaptzFwnVLUmjjhL86dU36Qo967MHMzUTf2+cJODlY4Lwiqa+uCWVZXpUI0b NUUqDKzoRgF/YGUMFBZFFdinhvQ5XDqD39grI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=kOxCF47K68cfRVxYkiUmYerJddShi9nwzBMxv7vuIYn5Yxja42Whf9A9V17JDpRznl RnIgPwm7TcmV2hgIlkZH+d5iHWspyoCCi1dwkUvd/aHfxUatdcGN4FAHkbo+TPSBmxQ5 2SGzNyS5RK09D6np83i2NRbznZJJ0Bbx7siAo= MIME-Version: 1.0 Received: by 10.223.114.74 with SMTP id d10mr749926faq.87.1236246707924; Thu, 05 Mar 2009 01:51:47 -0800 (PST) In-Reply-To: <22347983.post@talk.nabble.com> References: <22347983.post@talk.nabble.com> Date: Thu, 5 Mar 2009 10:51:47 +0100 Message-ID: <5380c69c0903050151h59457992i3719ba5dfef46b71@mail.gmail.com> Subject: Re: DSL Content Router interrupted with splitter() or multicast() From: Claus Ibsen To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Mar 5, 2009 at 10:25 AM, ee7arh wrote= : > > Hi, > > When I tryto use the functions "splitter()" or "multicast()" in my DSL > within a "choice()" block, I am not able to have another "when()" or even= an > "otherwise()" > > Predicate isInvitation > =A0 =A0 =A0 =A0=3D PredicateBuilder.regex(header("event_type"), "invitati= on"); > > Predicate isReply > =A0 =A0 =A0 =A0=3D PredicateBuilder.regex(header("event_type"), "reply"); > > from("jms:queue:myQueue") > .choice() > =A0 =A0.when(isInvitation) > =A0 =A0 =A0 =A0.to("bean:eventMarshaller?methodName=3DunmarshallTriggerIn= vites") > =A0 =A0 =A0 =A0.splitter(body()) // This line causes a compilcation probl= em on the > next when() or otherwise() > =A0 =A0 =A0 =A0.to("jms:queue:unmarshalledEventsQueue")) > =A0 =A0.when(isFlightUpdate) > > If I take out the splitter() line above, all works fine and I can have as > many when() statements as I like. Is there a reason why this doesn't work= ? Yeah the compiler can not follow you :) When you mix like that in some situations you get to a hold. The solution is to split your route in sub routes. So keep one route for the overall choice And then sub routes for the splitter You can use "direct:xxx" endpoints to connect them in sync fashion and use "seda:xxx" for async fashion. > > Thanks > Andrew > > > -- > View this message in context: http://www.nabble.com/DSL-Content-Router-in= terrupted-with-splitter%28%29-or-multicast%28%29-tp22347983p22347983.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > --=20 Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/