apache camel receive log - Java Message

Java examples for Message:apache camel

Description

apache camel receive log

Demo Code


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

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

        CamelContext context = new DefaultCamelContext();

        context.addRoutes(new RouteBuilder() {
            public void configure() {
                from(//from www.jav a2 s. c  om
                        "rabbitmq://localhost?exchange=logs&exchangeType=fanout")
                        .to("stream:out");
            }
        });
        context.start();
    }

}

Related Tutorials