=doc #3689 Make activator templates for camel samples
* @rkuhn found the problems in the scala camel samples - HttpSample returns scrambled data - CustomRouteSample times out
This commit is contained in:
parent
362074177a
commit
23dd957ba2
47 changed files with 693 additions and 559 deletions
|
|
@ -0,0 +1,19 @@
|
|||
package sample.camel.route;
|
||||
|
||||
import akka.actor.*;
|
||||
import akka.camel.CamelExtension;
|
||||
|
||||
public class CustomRouteSample {
|
||||
@SuppressWarnings("unused")
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
ActorSystem system = ActorSystem.create("some-system");
|
||||
final ActorRef producer = system.actorOf(Props.create(RouteProducer.class));
|
||||
final ActorRef mediator = system.actorOf(Props.create(RouteTransformer.class, producer));
|
||||
final ActorRef consumer = system.actorOf(Props.create(RouteConsumer.class, mediator));
|
||||
CamelExtension.get(system).context().addRoutes(new CustomRouteBuilder());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue