Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Reply from camel Route inOnly ?

$
0
0
I would like to have the reply from direct:channel2 back to the client.

And thought that inOnly means only request not reply.

But when a client calls this route, the reply is the String i generate in
.bean(Mq.class, "logStart") in my channel3

What to do ?

I have this camel route:

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");

Frank

Viewing all articles
Browse latest Browse all 5648

Trending Articles