Service Test Practitioners Forum
cancel

How to set ReplyToQ while doing a PUT Message.

reachksuraj
New Member.

How to set ReplyToQ while doing a PUT Message.

Hi,


The MQ Application that we intend to test expects the Request message to contain ReplyToQ information in its MQMD header. The Application reads the ReplyToQ value to send back the Response. How is the ReplyToQ value to be set in HP Service Test ?

 

We are using the 'Put and Get Message' option to run the test. As the ReplyToQ value is not set, the GET message returns an error stating 'No message available'.

 

Please advice.

 

Suraj.

1 REPLY
Highlighted
Ninfea
Regular Contributor.

Re: How to set ReplyToQ while doing a PUT Message.

Go to Events -> BeforeMQPutMEssage.

Now you have to write your custom code. Add the following namespace:
using IBM.WMQ;

Add the following code inside public void MQPutMessageToQueue6_OnBeforeMQPutMessage (...)
{
args.MQMessage.ReplyToQueueName="YourQueueName";
}