from("activemq:SomeQueue") .bean("myTransformerBean", "myMethodName") .to("mqseries:AnotherQueue");
Where the "myTransformerBean" would be defined in a Spring XML file or defined in JNDI etc. You can omit the method name parameter from beanRef() and the Bean Integration will try to deduce the method to invoke from the message exchange.
or you can add your own explicit Processor to do the transformation
or you can use the DSL to explicitly configure the transformation
Or you can use the Bean Integration to invoke a bean
<route> <from uri="activemq:SomeQueue"/> <bean ref="myTransformerBean" method="myMethodName"/> <to uri="mqseries:AnotherQueue"/> </route>
You can also use Templating to consume a message from one destination, transform it with something like Velocity or XQuery and then send it on to another destination. For example using InOnly (one way messaging)
from("activemq:My.Queue") .to("velocity:com/acme/MyResponse.vm") .to("activemq:Another.Queue");
If you want to use InOut (request-reply) semantics to process requests on the My.Queue queue on ActiveMQ with a template generated response, then sending responses back to the JMSReplyTo Destination you could use this.