Warm tip: This article is reproduced from stackoverflow.com, please click
ibm-mq jms mule mule4 mule-component

In Mule 4 using JMS Connector how to remove the RFH Header

发布于 2020-04-20 09:52:36

I am using JMS Connector to connect to IBM MQ. If I use IBM MQ Connector I have option (targetClient="NO_JMS_COMPLIANT") to disable RFH Header from the message. How can I achieve the same thing using the JMS Connector. My JMS config looks like below

<jms:config name="JMS_Config" doc:name="JMS Config" doc:id="b675becf-06f3-4847-bb95-4f468d5353ea" >
    <jms:generic-connection specification="JMS_2_0" connectionFactory="WMQ_ConnectionFactory" />
</jms:config>

Connection Factory looks like this:

<bean id="WMQ_ConnectionFactory" class="com.ibm.mq.jms.MQConnectionFactory" name="WMQ_ConnectionFactory">
    <property name="transportType" value="1" />
    <property name="hostName" value="MQ-SLQ01"/>
    <property name="port" value="1414"/>
    <property name="queueManager" value="SLQ01"/>
    <property name="channel" value="*******"/>
</bean>

JMS Connector config looks like this:

<jms:publish-consume doc:name="Publish consume" doc:id="b1d40cc6-deb0-42f0-aa50-4b230d843794" config-ref="JMS_Config" destination="P2.REQUEST" sendCorrelationId="ALWAYS">
    <jms:message >
        <jms:reply-to destination="P2.REPLY" />
    </jms:message>
</jms:publish-consume>

I have tried adding request queue name with P2.REQUEST?targetClient=1. I could not see any changes.

Questioner
Infinity
Viewed
73
aled 2020-01-18 21:05

I doubt the JMS connector allows to select a non-JMS compatible mode that is specific to a broker (IBM MQ). It a generic connector which provides no broker specific features. You should be using the IBM MQ connector for that that already provides that specific feature.