camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edmondo1984 <edmondo.po...@gmail.com>
Subject Re: Async reques/response
Date Sat, 06 Sep 2014 13:33:47 GMT
Hello,

in Camel you need endpoint to be able to "produce" or "consume" data.

So your route DSL look like the following : from(producer).to(consumer).

In your case, if you don't have a proper producer, you can use a "direct"
endpoint or a "seda" endpoint

from("direct:input").to("activemq:etcetc")

Then from the code that should produce the string, you will write the
following code:

CamelContext camelContext = new DefaultCamelContext();
camelContext.addRoutes(new MySimpleRouteBuilder());
ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
Object reply = producerTemplate.requestBody("direct:input","Hello world);


Does it make sense?

Best

Edmondo




--
View this message in context: http://camel.465427.n5.nabble.com/Async-reques-response-tp5756113p5756116.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message