Duplicate Messages

Configure the <enable> and <statusDirectory> properties to avoid having the adapter input and output duplicate messages.

By default, after the FIX adapter restarts, the FixMsgId value is reset to 0, which results in duplicate messages. To change this behavior and have the adapter log the last FixMsgId values for the input and output streams instead, add the following to your adapter configuration file (adapter.xml):
<resume>
  <enable>true</enable>
  <statusDirectory></statusDirectory>
 </resume>
Set the <enable> tag to true to enable this behavior, and specify the FixMsgId log location in the <statusDirectory>. If you do not specify a location, the value defaults to the current directory. To reset the FixMsgIds to 0, delete the FixMsgId log files before restarting the FIX adapter. Note that the FixMsgId gets reset to 0 whenever the FIX adapter is started with this feature disabled.

As a result of enabling this behavior, when you restart the FIX adapter, the adapter compares the last FixMsgIds in the logs with the values in the rows it receives from the input streams, and only sends the FIX messages which have a newer FixMsgId to the FIX server. This prevents duplicate orders and other transactions from being sent to the FIX server. On the output side, the adapter uses the last logged FixMsgId +1 rather than starting at 0, which prevents rows with duplicate key values from being published to Event Stream Processor.