Thanks for that Tarun I would classify my level of Camel expertise to be just about the same - perhaps 'enthusiast' too - I'm pretty impressed!
Camel JMS doesnt know about it because its a WMQ feature is something I have read on several occasions now and this is consistent with your account - which is most useful background. I also came across a thread at http://camel.465427.n5.nabble.com/Camel-2-4-0-Websphere-MQ-NONJMS-Message-td3241328.html that looks as though it addresses the same issue I am going to pair with a bottle of wine on this problem later - if I get a breakthrough I will let you know On 11 Mar 2011, at 17:15, Tarun Ramakrishna wrote: >> 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
