How to customize message descriptor if send reply directly in inbound MQ connection on CA API Gateway.

Document ID : KB000010321
Last Modified Date : 14/02/2018
Show Technical Document Details

Use Add Header assertion to add custom message descriptor for MQ messages.


For an inbound MQ connection, you may want to directly "Send Reply to specified queue" and "Set Response CorrelationID from Request's MessageID".

And you may also want to set custom message descriptor for the reply message.

But there is no option for adding message descriptor on inbound MQ connection configuration window.

This can be done by Add Header assertion in  the policy associated to inbound MQ connection.



In the policy associated to the inbound MQ connection, add a Manage Transport Properties/Headers Assertion to the end of the policy to set the custom message descriptor for the reply message. 

For example:

Target message: Response
Type: HTTP Header
Operation: Add or replace
Property/Header name:
Property/Header value: MQSTR

(or you can set the value as ${} if you just want to copy it from the request. The screenshot of a sample policy attached.)