WebSphere MQ connectors > Concepts > Queues and topics > Replying to a received message

Replying to a received message
It is possible to make StreamServer act upon a WebSphere MQ message received from a queue, and return a reply to the sender. To be able to send the reply to the sending application, the following runtime properties must be defined:
Queue - The name of the queue to post the reply.
Remote Queue manager - The name of the queue manager that hosts the queue above.
Correlation id - An ID used to connect the request to the reply
If you use any of the queue sender output connectors, you must assign these runtime properties based on information in the metadata in the incoming message. Proceed with the following steps:
1
$correlationId=GetConnectorValue("IBMMQMsgId");
$replyToQueue=GetConnectorValue("IBMMQReplyToQ");
$replyToQueueManager=GetConnectorValue("IBMMQReplyToQMgr");
2
Queue: $replyToQueue
Correlation Id: $correlationId
Remote Queue manager: $replyToQueueManager
In the script you have a choice to assign either the message ID of the incoming message as shown in the example, or to use the correlation ID of the incoming message. You might even want to apply a formula in order to generate the correlation ID. This can all be done in the script. See Message metadata for available metadata values.
OpenText StreamServe 5.6 Updated: 2013-03-01