This sample demonstrates how a JavaCompute node can be used as a filter node, and the use of user-defined attributes.
The node has two user-defined attributes: filterField and filterRegex. The node extracts the element value of the first field in the message with the name held by the attribute filterField. If the value matches the regular expression held by the attribute filterRegex, the message is propagated to the Out terminal, otherwise it is propagated to the Alternate terminal.
This sample completes the following tasks:
The following WebSphere MQ queues are created by the sample:
The following message flow, RegexFilterNodeFlow, is imported by the sample: