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