Message filters

You can filter the way messages are received in two different ways: Java Message Service (JMS) filters and Test Integrations and APIs filters.

Important: When you use filtering, the system under test must be correctly configured. Messages that are filtered out are silently discarded. HCL DevOps Test Integrations and APIs (Test Integrations and APIs) does not produce any warnings or errors.

Java Message Service (JMS) filters

The Message Selector field under Subscriber Configuration (see Subscriber options) accepts standard JMS filtering expressions (message selectors). When used, Test Integrations and APIs receives only messages that match the specified selector.

For example, if MyId='585858' is entered, only messages with the header field "MyId" having a value of 585858 is received. To send matching messages in an Test Integrations and APIs publisher, you would configure a message property as shown.

Note: Filtering is performed on message header properties, and matching messages are passed to Test Integrations and APIs (In other words, the JMS server filters the messages, not Test Integrations and APIs). This setup is useful in environments that share a single JMS queue or topic. By getting the applications to set header properties, you can separate messages logically. Test Integrations and APIs can interact with the messages from Application A without affecting the messages of Application B.

Test Integrations and APIs filters

After messages are passed to Test Integrations and APIs, they can be further filtered, using header and body fields, with the configuration in the Filter tab.

In this case, JMSDestination must equal "business.inventory global" and JMSCorrelationID must equal "32458". Otherwise, Test Integrations and APIs discards the message.