Re: How to set MQMD.ReplyToQ when putting message to MQ? (340 Views)
Reply
Occasional Visitor
andrey_r
Posts: 1
Registered: ‎11-30-2012
Message 1 of 2 (496 Views)

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.

 

Occasional Advisor
Ninfea
Posts: 7
Registered: ‎10-30-2013
Message 2 of 2 (340 Views)

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

}

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.