return new RouteBuilder() {
public void configure() throws Exception {
from("activemq:test.a").process(new Processor() {
public void process(Exchange exchange) throws Exception {
// lets set the custom JMS headers using the JMS API
JmsExchange jmsExchange = assertIsInstanceOf(JmsExchange.class, exchange);
Message inMessage = jmsExchange.getInMessage();
inMessage.setJMSReplyTo(replyQueue);
inMessage.setJMSCorrelationID(correlationID);
inMessage.setJMSType(messageType);
}
// must set option to preserve message QoS as we send an InOnly but put a JMSReplyTo