Service Test Practitioners Forum
cancel

How to set MQMD.ReplyToQ when putting message to MQ?

Highlighted
andrey_r
New Member.

How to set MQMD.ReplyToQ when putting message to MQ?

Hi,

 

When I send message to MQ I have to set MQMD.ReplyToQ field.

But in "Put Message to MQ Queue" step in Service Test I cannot find MQMD fields except of few (MessageId, CorrelId, Message format, Priority, etc).

 

Is there any way to set MQMD fields except of displayed on Property Sheet (maybe programmatically)?

 

Thank you,

Andrey.

 

1 REPLY
Ninfea
Regular Contributor.

Re: How to set MQMD.ReplyToQ when putting message to MQ?

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";

}