iNTERFACEWARE Products Manual > Learning Center > Tutorials and Sample Scenarios > Routing and Processing Messages > Generating NACK Messages in Iguana 4.0 and Later > Creating the Filtering VMD File |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
At this point, you have successfully identified which messages are to be accepted and which are to be rejected. Your application sends an ACK message when a message is accepted and a NACK message when a message is rejected. However, your Iguana channel is still processing all messages it receives, whether it accepts them or not. You may want to modify your Iguana channel to filter rejected messages and not send them to the destination component of the channel. To do this, you will need to create a VMD file that filters messages, and then you will need to modify the channel's Filter component to use this file. To create the filtering VMD file:
Now that you have imported the segments, the next step is to create a default message definition. This message definition will process all messages that are not rejected. To create this message definition:
The message definition named default is now the default message definition for this VMD file. If a message cannot be processed by any other definition, it will be processed by this one. The next step is to create a message definition that will match all rejected messages. To do this:
This indicates that a message will be treated as rejected if the third subfield of the ninth field of the MSH segment (also known as MSH.9.3) is set to REJECTED. Normally, this field is empty. In the next step of this tutorial, you will write a Python script that checks for rejected messages and sets this subfield if a rejected message is found. |