I need to listen on the MQ Reply queue for a response message with a specific correlation ID. Is there a way to accomplish this on the IBM WebSphere DataPower SOA appliance?
The following approach may be used to listen on the MQ Reply queue for a response message with a specific correlation ID:
- If you have an MQ backend URL, remove the ReplyQueue parameter from the url.
- In the request processing rule, save the information (message or correlation ID) that will be used to populate the correlation ID for the MQ GET request in a DataPower context variable.
- In the response processing rule, use the dp:url-open extension function to make the MQ GET request based on the specific correlation ID. The details are as follow
- Obtain the information saved in the context variable (in the request rule).
- Set the correlation Id via the X-MQMD-GET header.
- Use the dp:url-open extension function to make the MQ GET request.
- If you wish to specify a timeout on the MQ GET request, when building the MQ url to be used with the dp:url-open function, you may specify a timeout in milliseconds using the TimeOut query parameter.
- Ensure the appropriate response type is specified on the dp:url-open extension function.
This thread in the DataPower forum on developerWorks also contains some helpful information along with a sample structure of the X-MQMD-GET header.
Additional information on the url-open function can be found by reviewing the DataPower 'Extension Functions and Elements' from the DataPower Product Documentation. From the Product Document or Information Center, you may use the following path to access the 'Extension elements':
'Reference' -> 'Extension Functions and Elements' -> 'Extension elements'
The following link may also be used to access more information about the url-open command.