apache camel rabbitmq simple call - Java Message

Java examples for Message:apache camel

Description

apache camel rabbitmq simple call

Demo Code


import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;

public class Recv {

    public static void main(String args[]) throws Exception {

        CamelContext context = new DefaultCamelContext();

        context.addRoutes(new RouteBuilder() {
            public void configure() {
                from("rabbitmq://localhost?queue=hello").to("stream:out");
            }//  w  w  w  .ja v a  2  s  .co  m
        });
        context.start();
    }
}

Related Tutorials