camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kumar5 <deelip.kum...@gmail.com>
Subject multiple routes in single camelcontext with same reslut name
Date Mon, 25 Apr 2016 22:47:55 GMT
i want to understand how camel behaves if have multiple routes in single
camelcontext with same "mock:wsResult"  and "mock:wsError" for all routes
and calling route from java using ProducerTemaplate and mcokEndpoint 
is it  give me receptive thread result or error  object in multiple
environment or i have to give different error or result name for each route
can you tell me how it work this "mock:" in multiple thread environment.


from("direct:a")
.onException(Exception.class)			 	
 .handled(true)		 	
 .to("mock:wsError")
.end()  
.to("Hi a")
.to("call bean")
.to("mock:wsResult")

from("direct:b")
.onException(Exception.class)			 	
 .handled(true)		 	
 .to("mock:wsError")
.end()  
.to("Hi b")
.to("call bean")
.to("mock:wsResult")




from("direct:c")
.onException(Exception.class)			 	
 .handled(true)		 	
 .to("mock:wsError")
.to("Hi c")
.to("call bean")
.to("mock:wsResult")

java Route calling code:

MockEndpoint reslut = getMockEndpoint("mock:wsResult);
MockEndpoint error = getMockEndpoint("mock:wsError");
ProducerTemplate template = camelContext.createProducerTemplate();
template.sendBody("direct:a")

template.sendBody("direct:b")
template.sendBody("direct:c")





--
View this message in context: http://camel.465427.n5.nabble.com/multiple-routes-in-single-camelcontext-with-same-reslut-name-tp5781689.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message