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: Choich() with multiple Routing EIP
Date Thu, 09 Feb 2012 05:01:46 GMT
There is a a .endChoice() which may do the trick.


On Wed, Feb 8, 2012 at 6:33 PM, Christos Vasilakis <cvasilak@gmail.com> wrote:
> Hi there,
>
> first of all many thanks for your excellent work!. It really makes my life easier!
>
> I am newcomer to camel so please bear with me ;)
>
> I have the following route:
>
>                from("switchyard://ServiceRRDRoute").routeId("ServiceRRDRoute")
>                .wireTap("jms:svc_rrd_audit?connectionFactory=#JmsXA")
>                .choice()
>                        .when(header("ServiceRRD_msg_type").isEqualTo("fetchGraphSimple"))
>                                .unmarshal().json(JsonLibrary.Jackson,
FetchGraphSimpleCommandMessage.class)
>                                .dynamicRouter(bean("bean:RecipientListBean?method=processSimpleGraph"))
>                                .log("fetchGraphSimple request send to
consumers.")
>                                .end()
>                        .when(header("ServiceRRD_msg_type").isEqualTo("fetchLast"))
>                                .unmarshal().json(JsonLibrary.Jackson,
FetchLastCommandMessage.class)
>                                .to("bean:RecipientListBean?method=processFetchLast")
>                                .recipientList(header("ServiceRRD_recipients"))
>                                .log("fetchLast request send to consumers.")
>
> But I get a compile error
>        cannot find symbol method when(org.apache.camel.Predicate)
>
> Basically the second when() fails to compile?
>
> This means that in the choice() I can't use dynamicRouter() and recipientList() together?
Or is there any other way to accomplish this
>
> Thanks for all your help
>
> Regards,
> Christos
>
>
>



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