#143 Added second message channel.

This commit is contained in:
Ilkka Seppala 2015-09-02 21:42:32 +03:00
parent b99d2b76de
commit f74c8c27d1

View File

@ -21,9 +21,10 @@ import org.apache.camel.impl.DefaultCamelContext;
* doesn't pull info off some random channel; it selects what channel to get information * doesn't pull info off some random channel; it selects what channel to get information
* from based on what type of information it wants. * from based on what type of information it wants.
* <p> * <p>
* In this example we use Apache Camel to establish a direct synchronous Message Channel * In this example we use Apache Camel to establish two different Message Channels. The first
* that delivers messages to console output. No actual messages are sent, only the established * one reads from standard input and delivers messages to Direct endpoint. The second Message
* routes are printed to standard output. * Channel is established from the Direct component to console output. No actual messages are sent,
* only the established routes are printed to standard output.
* *
*/ */
public class App { public class App {
@ -40,6 +41,7 @@ public class App {
@Override @Override
public void configure() throws Exception { public void configure() throws Exception {
from("stream:in").to("direct:greetings");
from("direct:greetings").to("stream:out"); from("direct:greetings").to("stream:out");
} }
}); });