0

I am facing an issue where the receiving application (consumer/listener of an IBM MQ) cannot handle MQHRF2 format and is expecting the raw MQSTR format instead.

When put a plain old XML message into the queue using WSO2 Integrator (v. 6.1.1), the receiving application sees:

RFH     €    zMQSTR      z   <mcd><Msd>jms_text</Msd></mcd>     X<jms>
<Dst>queue://QUEUE_ALIAS</Dst><Tms>1532002363544</Tms><Dlv>2</Dlv></jms>

ahead of my XML message which starts right after the JMS tag.

How can I force WSO2 to put MQSTR instead of MQRFH2 into the Websphere MQ? I have tried the following property just before sending via my endpoint but it has no effect.

<property name="JMS_IBM_FORMAT" value="MQSTR" scope="transport" type="STRING" action="set"/>
<send>
    <endpoint key="conf:/endpoints/MY_ENDPOINT.xml"/>
</send>

The endpoint is merely defined as:

<endpoint name="MY_ENDPOINT" xmlns="http://ws.apache.org/ns/synapse">
    <address format="pox" uri="jms://QUEUE_ALIAS"/>
</endpoint>
Petteri Pertola
  • 281
  • 2
  • 6
  • 23
  • possible duplicate https://stackoverflow.com/questions/37186558/how-to-remove-rfh2-header-for-a-jms-client – Kulan Sachinthana Jan 03 '20 at 02:42
  • Hi, the above is referring to JMS clients. This is a specific question relating to WSO2 since we don't have access to the JMS configuration the same way as you would have from Java for example. – Petteri Pertola Jan 04 '20 at 12:16

2 Answers2

0

The RFH2 header is added by MQ. If you don't need it, add targetClient=1 to the location URI, like:

queue:///MYQUEUE?targetClient=1

http://www.mqseries.net/phpBB2/viewtopic.php?=&p=171236

Attila Repasi
  • 1,803
  • 10
  • 11
0

Change the queue definition the application gets from as follows:-

ALTER QLOCAL(q-name) PROPCTL(NONE)
Morag Hughson
  • 7,255
  • 15
  • 44
  • Thanks, but we do not have access to the queue definitions or ways to change them, so we need application specific way to determine the message type. – Petteri Pertola Jul 23 '18 at 11:42