Service Test Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

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

andrey_r
Acclaimed Contributor

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
Highlighted
Ninfea
Occasional 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";

}

//Add this to "OnDomLoad" event