Configuring the targetClientMatching property for an activation specification
You can configure the targetClientMatching property for an activation specification so that an MQRFH2 header is included on reply messages when request messages do not contain an MQRFH2 header. This means that any message properties that an application defines on a reply message are included when the message is sent.
About this task
If a message-driven bean (MDB) application consumes messages that do not contain an MQRFH2
header, through an IBM® MQ JCA resource adapter
activation specification, and subsequently sends reply messages to the JMS Destination created from
the JMSReplyTo
field of the request message, the reply messages must include an
MQRFH2 header, even if the request messages do not, otherwise any message properties that the
application has defined on a reply message are lost.
The targetClientMatching property defines whether a reply message, sent to the queue identified by the JMSReplyTo header field of an incoming message, has an MQRFH2 header only if the incoming message has an MQRFH2 header. You can configure this property for an activation specification, in both WebSphere® Application Server traditional and WebSphere Application Server Liberty.
If you set the value of the targetClientMatching property to false, an MQRFH2 header can be included in a reply message sent to a JMS Destination created from the JMSReplyTo header of an incoming request message that does not contain an MQRFH2. This is because the targetClient property on the JMS Destination is set to the value 0, which means that messages contain an MQRFH2 header. The presence of the MQRFH2 header in the outbound message permits the storage of user defined message properties on the message when sent to the IBM MQ queue.
If the targetClientMatching property is set to true and a request message does not include an MQRFH2 header, an MQRFH2 header is not included in the reply message.