Put channel3 last, or use an aggregation strategy to keep the response you want. By default multicast uses the last response.
See more details here http://camel.apache.org/multicast On Fri, Aug 8, 2014 at 7:42 AM, Frankiboy <mail.to.fra...@gmail.com> wrote: > I have this 3 routes, now the input from channel3 gets back to the client i > want the channel2 reply back to the client, any ideas out there ? > > > > from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() > .bean(AddIpBean.class) > .bean(SetRoutingKey.class) > .bean(Util.class, "setMiljo") > .multicast() > .to("direct:channel1", "direct:channel2","direct:channel3"); > > from("direct:channel1") > .setHeader(HubConstants.LOGSTATE.getValue(), > constant(HubConstants.MQSTART.getValue())) > .bean(Mq.class, "mqHeaders") > .bean(Mq.class, "logStart") > .choice() > .when(header(HubConstants.MILJO.getValue()).contains("U")) > .inOnly("activemqudv:topic:HUB_TOP01").otherwise() > .inOnly("activemq:topic:HUB_TOP01"); > > from("direct:channel2") > .recipientList().method(Util.class, "getEndpoint"); > > from("direct:channel3") > .setHeader(HubConstants.LOGSTATE.getValue(), > constant(HubConstants.MQSLUT.getValue())) > .bean(Mq.class, "mqHeaders") > .bean(Mq.class, "logStart") > .choice() > .when(header(HubConstants.MILJO.getValue()).contains("U")) > .inOnly("activemqudv:topic:HUB_TOP01").otherwise() > .inOnly("activemq:topic:HUB_TOP01"); > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/3-Routes-how-to-get-the-second-routes-reply-back-to-the-client-tp5754933.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/