I am using a JMS client. The queue is a IBM MQ. When I write data on the queue, it is added with the RFH header. How can I strip the RFH header. I cannot use IBM MQ apis.
Another way is using the queue URI attributes (http://www.ibm.com/support/knowledgecenter/api/content/nl/en-us/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q032240_.htm#q032240___q032240_4).
The attribute targetClient
controls whether to use RFH or native format.
Queue queue = queueSession.createQueue("queue:///" + queueName + "?targetClient=1");
Starting from IBM WebSphere MQ v7, recommended way to tell the Java implementation NOT to generate MQRFH2 headers is to call MQDestination.setMessageBodyStyle( WMQConstants.WMQ_MESSAGE_BODY_MQ)
as TARGCLIENT
property is only used as a fallback option if MessageBodyStyle
was explicitly set to UNSPECIFIED
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With