Prevent duplicate message import

To avoid duplicate message import, KC Plug-In provides a locking mechanism. Using this mechanism, KC Plug-In create files with unique ID returned by Message Connector in the ReceiveMessage call. The file is created on a local or network folder as configured. This folder must be common for all the configured KC Plug-In applications.

By default, KC Plug-In uses the folder defined in the Kofax Capture's "ServerPath" registry key as the root path and creates a "KofaxImportConnector\LockFileStore" folder under the root path.

Additionally, you can configure this path in the <LockStorePath> element of the Kofax Import Connector's configuration XML file. The path defined in <LockStorePath> takes precedence over the Kofax Capture's "ServerPath" registry key. By default, the <LockStorePath> element is empty.

KC Plug-In first verifies whether the file with the received ID already exists.

  1. If the file does not exist, KCPlug-In creates the lock file and continuesprocessing the message. The message gets the "Retrieved and queued" status.
  2. If the file already exists, KC Plug-In checks if the file is exclusively locked. If the file is locked, this means that another KC Plug-In instance is processing the message, thereforeKC Plug-In does not process this message and continues fetching the next message.

Codes and thecorresponding description of message status in the lock file are listed in the following table.

Code

Status

Description

10

Retrieved and queued

The message is retrieved from Message Connector and is queued in the KC Plug-In message queue to be processed into Capture.

20

Processing into Capture

The message is being imported into Capture after the create batch operation.

30

Closing batch

All messages are imported into Capture and the close batch operation is in progress

50

Import OK

The close batch operation was successfully completed.

60

Retry confirm - Confirm failed and the Confirm call is scheduled for retry (for example, Message Connector is down when KC Plug-In tries to confirm the message)

Te close batch operation succeeded, but Confirm message failed.

The KC Plug-In instance that imported the message schedules five more retries every five minutes.

70

Confirm Pending

Confirm failed five times. The status is updated to Confirm Pending and any KC Plug-In instance that eventually receives a message with this ID, which retries to confirm it.

100

OK

Close batch operation and confirming message back to Message Connector are successfully completed.

By default, the locking mechanism is disabled. To enable it, do the following:

  1. Start the KC Plug-In configuration, open any connection and click OK.
  2. Close the KC Plug-In configuration.
  3. Open the C:\ProgramData\Kofax\KIC-ED\KCPlugIn\config\KIC-ED-KCPlugIn.xml file.

  4. Search for <LockStoreEnabled>false</LockStoreEnabled>.

  5. Replace 'false' with 'true'.

    It should look similar to: <LockStoreEnabled>true</LockStoreEnabled>.

  6. To avoid duplicates from Right fax, set the element <LockStorePreferSourceTransferID> value to true.

    It should look similar to: <LockStorePreferSourceTransferID>true</LockStorePreferSourceTransferID>.

  7. Save the XML file.
  8. Restart KC Plug-In.

The lock folder path length (excluding the filename length) must not exceed 200 characters. It assumes that the length of the RightFax Unique-ID (which is generally 15 characters) is less than 20 characters. In the unlikely case that the RightFax Unique-ID is longer, the maximum lock folder path length decreases accordingly.

By default, the Kofax Import Connector uses the file path defined in Kofax Capture's"ServerPath" registry key and creates the "KofaxImportConnector\LockFileStore" folder under it.