apache - ProducerTemplate and Direct:start in camel -


my camel route :

from("direct:start") .to("http://myhost/mypath"); 

i used :

producertemplate template;  template.sendbody("direct:start", "this test message");  

to send exchange. getting following exception:

no consumers available on endpoint: endpoint[direct://start]. 

how can receive same exchange in direct:start endpoint?

the reason error because have not configured route starts direct:start.

if have configured route, did not mention in original query, next step try first start camel context, before calling sendbody method.

camelcontext.start(); template.sendbody("direct:start", "this test message");  

hope resolves issue.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -