Not nice, than i have to copy the same 3 lines 3 times in my code....
Is there not a better solution to this...
from("direct:channel1")
.bean(SetRoutingKey.class)
.choice()
.when(header(ROUTING_KEY).contains(ROUTING_HREG_BD)).setHeader("BD",
constant("YES"))
.setHeader("JMS_IBM_Format", constant("MQSTR"))
.bean(LogMq.class, "logStart")
.inOnly("activemq:topic:HUB_TOP01")
.when(header(ROUTING_KEY).contains(ROUTING_HREG_BEC)).setHeader("BD",
constant("YES"))
.setHeader("JMS_IBM_Format", constant("MQSTR"))
.bean(LogMq.class, "logStart")
.inOnly("activemq:topic:HUB_TOP01")
.when(header(ROUTING_KEY).contains(ROUTING_HREG_SDC)).setHeader("BD",
constant("YES"))
.setHeader("JMS_IBM_Format", constant("MQSTR"))
.bean(LogMq.class, "logStart")
.inOnly("activemq:topic:HUB_TOP01");
--
View this message in context:
http://camel.465427.n5.nabble.com/how-to-get-Choice-When-to-continue-tp5754682p5754708.html
Sent from the Camel - Users mailing list archive at Nabble.com.