> The error is in attempting to set that value but I am unclear why it should > be. Well..I can explain the reason if not how to solve this problem specifically for the camel jms component. I probably will run into your problem in the future since we have need to post and reply using native messages to Websphere MQ, though we haven't got around to doing this yet.
The reason is because legacy Websphere MQ clients cannot understand Websphere MQ JMS compliant messages. The 'native' WMQ message format was invented before the days of the JMS spec, so they needed to add another header called the MQRFH2 header to support JMS compliant messages. (for features like typed message properties, etc). Unfortunately, those legacy applications (usually on mainframes, etc) cannot parse such messages. So, one needs to tell the driver to form WMQ messages without the MQRFH2 header. This is generally done by using MQDestination.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ). The value of JMS.MQJMS_CLIENT_NONJMS_MQ is 1. Additionally, if you are using the Reply-To header, you also need to call MQConnectionFactory.setTargetClientMatching(true), so that the replies do not construct the RFH2 header. I am just a Camel beginner, but it looks to me as if the camel jms component doesn't know about all this stuff.. Best Regards, Tarun