B2B Integration 10.5 | Administering and Monitoring B2B Transactions | Service Development Help | Working with JMS Triggers | Creating a JMS Trigger | Adding Routing Rules to a Standard JMS Trigger | Creating a Local Filter
 
Creating a Local Filter
You can further refine the messages received and processed by a standard JMS trigger by creating local filters. A local filter specifies criteria for the contents of the message body. Integration Server applies a local filter to a message after the JMS trigger receives the message from the JMS provider. If the message meets the filter criteria, Integration Server executes the trigger service specified in the routing rule. If the message does not meet the filter criteria, Integration Server discards the message and acknowledges the message to the JMS provider.
If a JMS trigger contains multiple routing rules to support ordered service execution, you can use local filters to process a series of messages in a particular order. For more information about ordered service execution, see Building Standard JMS Triggers with Multiple Routing Rules.
When creating a local filter, you can omit the JMSMessage document from the filter expression even though it is part of the pipeline provided to the JMS trigger service. For example, a filter that matches those messages where the value of the myField field is “XYZ” would look like the following:
%properties/myField% == "XYZ"
Note that even though the properties field is a child of the JMSMessage document, the JMSMessage document does not need to appear in the filter expression.
The following filter matches those messages where the data document within the JMSMessage/body document contains a field named myField whose value is “A”:
%body/data/myField% == "A"
Note: When receiving a batch of messages, Integration Server evaluates the local filter against the first message in the batch only. Integration Server does not apply the filter to subsequent messages in the batch. For more information about batch processing, see About Batch Processing for Standard JMS Triggers.

Copyright © 2016- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.