THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
With the Spring DSL we can declare the consumer in the CamelContext with the consumerTemplate tag, just like the ProducerTemplate. The example below illustrates this: TODO: e1
Wiki Markup |
---|
{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/SpringConsumerTemplateTest-context.xml} |
Then we can get leverage Spring to inject the ConsumerTemplate
in our java class. The code below is part of an unit test but it shows how the consumer and producer can work together. TODO: e1,
Wiki Markup |
---|
{snippet:id=e1|lang=java|url=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringConsumerTemplateTest.java} |
TODO: Create a JMS sample with a timer to poll a JMS queue every 5th sec.
...