Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Next you must start the camel context. If you are using Spring to configure the camel context this is automatically done for you; though if you are using a pure Java approach then you just need to call the start() method

Code Block

camelContext.start();

This will start all of the configured routing rules.

...

From the ProducerTemplate - we send objects (in this case text) into the CamelContext to the Component test-jms:queue:test.queue. These text objects will be converted automatically into JMS Messages and posted to a JMS Queue named test.queue. When we set up the Route, we configured the FileComponent to listen of off the test.queue.

The File FileComponent will take messages off the Queue, and save them to a directory named test. Every message will be saved in a file that corresponds to its destination and message id.

...