Question

I have a camel route which is supposed to consume a JMS message from a topic and invoke a spring bean. Route definition

from("jms:topic:testQueue?transacted=true&connectionFactory=#myJmsConnectionFactory&messageConverter=#myMessageConverter")
.autoStartup("true")
.to("bean:myService?method=consumeJMSMessage")
.routeId("myRouteId.consumeJMSMessages");

My question is that where is the xml read and where can i access it, not sure how to pass it to my service method consumeJMSMessage() which currently takes no arguments?

Appreciate any help on this.

Regards, Rahul

Was it helpful?

Solution

As specified in from clause; you are using myMessageConverter bean. Camel looks up the specified bean from spring application context. This bean needs to implement the MessageConverter interface. So if you need to customize conversion of JMS message to XML dom then you need to implement a bean implementing this interface.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top