Hi,
We have a requirement where in we have to add the routes at the runtime to
camel-context which is already running.
The following piece of code works for the first time, but when i execute it
for the second time it causing mulitple consumer error.
code:
public void addroutestocontext(CamelContext camelContext){
String Rqendpoint=direct:test1;
String Rsendpoint=direct:test2;
MessageRouter router=new MessageRouter();
router.setRqendpoint(Rqendpoint);
router.setRsendpoint(Rsendpoint);
*camelContext.addRoutes(router);*
--------------------
--------------------
producer.asyncRequestBodyAndHeaders(,Rqendpointbody, headers);
.......
.....
}
Issue:Cannot add a 2nd consumer to the same endpoint. Endpoint
Endpoint[direct://test1] only allows one consumer
Please provide me a solution.
Thanks a lot.
--
View this message in context:
http://camel.465427.n5.nabble.com/Adding-Routes-at-the-runtime-cannot-add-multiple-consumer-to-the-same-endpoint-tp5746918.html
Sent from the Camel - Users mailing list archive at Nabble.com.