Prevent Duplicate MEF Events

In certain circumstances the MATRIXX Engine may allow you to process MATRIXX Event Files (MEFs) that result in duplicate events. To compensate for this, you may implement your own code to check for duplicate events outside of MEF publishing and processing. To ensure duplicate events are not processed, confirm that the MEF progress file is in sync with the published MEFs.

Creating Your Own Code to Avoid Duplicate Events

If a MATRIXX Engine fails over, the MEF progress file might become out of sync with the published MEFs. Processing MEFs in this condition (immediately after a failover) might cause your MEF processing code to give you duplicate events. If preventing duplicate events from being processed is crucial to your MATRIXX environment, create your own logic to confirm that each EventId value is unique within a certain time.

Understanding the MEF Progress File

MEF progress files are stored in the same directory as the MEFs and have this naming syntax:
PublishProgress.engine_engine_id
Where engine_id identifies the MATRIXX Engine creating the MEFs. For example PublishProgress.engine_3.

Preventing Duplicates in MEF Processing after a Failover

To avoid processing duplicate events immediately after a MATRIXX Engine failover, perform these steps for each engine in your MATRIXX environment before restarting it:

  1. On the MATRIXX Engine, find and record the MaxGtc value in the MEF progress file.
  2. Search for and do not process MEF files whose names contain a MinGtc that is equal to or higher than progress file MaxGtc value from Step 1. You may process any that do not match this criteria. For details on MEF filenames, see the discussion about MEF identification.