Package akka.camel

Examples of akka.camel.CamelMessage


    return "jetty:http://localhost:8877/camel/default";
  }

  public void onReceive(Object message) {
    if (message instanceof CamelMessage) {
      CamelMessage camelMessage = (CamelMessage) message;
      String body = camelMessage.getBodyAs(String.class, getCamelContext());
      getSender().tell(String.format("Hello %s",body), getSelf());
    } else
      unhandled(message);
  }
View Full Code Here


    ActorSystem system = ActorSystem.create("some-system");
    Props props = Props.create(Orders.class);
    ActorRef producer = system.actorOf(props,"jmsproducer");
    Map<String,Object> headers = new HashMap<String, Object>();
    headers.put(CamelMessage.MessageExchangeId(),"123");
    producer.tell(new CamelMessage("<order amount=\"100\" currency=\"PLN\" " +
      "itemId=\"12345\"/>",headers), ActorRef.noSender());
    //#Correlate
    system.stop(producer);
    JavaTestKit.shutdownActorSystem(system);
  }
View Full Code Here

TOP

Related Classes of akka.camel.CamelMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.