2012-07-15 14:12:03 +02:00
|
|
|
package docs.camel;
|
|
|
|
|
//#ProducerTemplate
|
|
|
|
|
import akka.actor.UntypedActor;
|
|
|
|
|
import akka.camel.Camel;
|
|
|
|
|
import akka.camel.CamelExtension;
|
|
|
|
|
import org.apache.camel.ProducerTemplate;
|
|
|
|
|
|
2012-07-23 01:36:12 +02:00
|
|
|
public class MyActor extends UntypedActor {
|
2012-07-15 14:12:03 +02:00
|
|
|
public void onReceive(Object message) {
|
|
|
|
|
Camel camel = CamelExtension.get(getContext().system());
|
|
|
|
|
ProducerTemplate template = camel.template();
|
|
|
|
|
template.sendBody("direct:news", message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//#ProducerTemplate
|