This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Console Example

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

This is implemented with a Camel route defined in the Spring XML markup shown below:

Wiki Markup
{snippet:id=e1|lang=xml|url=camel/trunk/examples/camel-example-console/src/main/resources/META-INF/spring/camel-context.xml}

...

This example can be launched from the command line using Maven:

Code Block

mvn compile exec:java

...

In the console you can enter a message and press <ENTER>. Camel responds by echoing the input message in upper case, as shown below:

Code Block

[onsole.CamelConsoleMain.main()] SpringCamelContext             INFO  Apache Camel 2.10 (CamelContext: camel-1) started in 0.455 seconds
Enter something: camel rocks
CAMEL ROCKS
Enter something: and we have fun
AND WE HAVE FUN
Enter something: 

...

To stop the example, strike Control+C

...

Click on the screenshot below, to make it bigger.

...