Message Filters
When reading messages from WebSphere MQ, you can limit which messages are read using message filters.
Filter Scenario: Request-Reply
One common use for filters is in a request-reply interaction. In this scenario, a message publisher puts a Request message in the queue that is handled by a service application. The Request message specifies a Reply To Queue name, indicating the queue where the requestor looks for the reply message.
Because the same Reply to Queue is often used by many message requestors, the message requester can use the correlation ID generated by the Put activity to identify those reply messages that are sent in response to its own request.
To enable this functionality, map the correlationId element from the Output tab of the Put activity to the correlationId element in the Input tab of the Get activity that reads the reply message. Starting from version 8.2.0 of the Plug-in, there is a specific RequestReply activity to automate this pattern.
Filter Scenario: Reports
Filters can also be used to identify the confirmation of delivery report associated with a put message.
When a put message activity requests a delivery report using the report element in the Input tab, the queue manager puts a report message into the specified Report Reply Queue queue.
Correlation IDs are used to relate the original put message to the report messages. Using the Pass Correlation ID check box, you choose whether the original message ID or correlation ID is used for the report message correlation ID.
As in the previous scenario, the process can pass the correlationId element shown in the Output tab of the Put activity to the correlationId element in the Input tab of Get activity that reads the report messages.