Hi,

I have in my RouteBuilder something like this:

public class MyRouteBuilder extends RouteBuilder{
private static final String 
IN_QUEUE="activemq:myqueue.in?messageConverter=#myMessageConverter";

@Override
public void configure(){
        from(IN_QUEUE).choice()
        .when(header("JMSType").isEqualTo("CommandType"))
        .inOut("bean:messageListener?method=handleMessage")
        .otherwise().to("activemq:myqueue.in.DLQ")
        .routeId("jms-my-route");
}

}

The handleMessage method in MessageListener processes the input and generates a 
POJO which is set to the message body, but the Type in the JMS header is not 
set to the proper return type. What is the proper way of setting the message 
converter for the reply message?

Regards,
xuan

Reply via email to