Set up and Run the Connector

You can set up the connector using the instructions in Run the Connector. SimpleSynchronize.dll must be in the connector directory, and you must set the following parameters in connectorLibDotNet.cfg:

       DotNetConnectorLibrary=SimpleSynchronize.dll
       DotNetConnectorClass=MyConnectorNamespace.MyConnector

This example connector uses a folder on the file system to represent a repository. In the connector's configuration file you can set a parameter named Directory that specifies the location of this folder. The default value, which applies if you do not set the parameter, is the data folder in the same directory as the connector. Create the data folder and add two or three files to it.

When you run the connector, it ingests all of the files in the directory. If you run the connector without CFS running, you should see information like this logged to synchronize.log:

       00-Always: Starting SYNCHRONIZE for task 'MYTASK1'
       30-Normal: MYTASK1: Queuing Add: data\file1.txt	
       30-Normal: MYTASK1: Queuing Add: data\file2.txt
       70-Error: MYTASK1: INGESTION: Send error: ACI error: Cannot Connect
       30-Normal: MYTASK1: INGESTION: Pending:0 Sending:0 Done:0 Failed:2
       70-Error: MYTASK1: Ingestion failed for data\file1.txt
       70-Error: MYTASK1: Ingestion failed for data\file2.txt
       00-Always: Finished SYNCHRONIZE for task 'MYTASK1' 

For each file in the data folder a “Queuing Add” message is logged automatically by the Ingester.Add method. Following that is an error from the Ingester showing that it could not connect to CFS. After that there are failure messages from the ingest result handler (ResultHandler) which was called for each file that could not be ingested.

The default [Ingestion] section in the connector's configuration file points to a CFS listening on port 7000. If a CFS is listening on this port when you run the connector, the log messages are different:

       00-Always: Starting SYNCHRONIZE for task 'MYTASK1'
       30-Normal: MYTASK1: Queuing Add: data\file1.txt
       30-Normal: MYTASK1: Queuing Add: data\file2.txt
       30-Normal: MYTASK1: INGESTION: Pending:0 Sending:0 Done:2 Failed:0
       30-Normal: MYTASK1: Document data\file1.txt, ingest Add succeeded!
       30-Normal: MYTASK1: Document data\file2.txt, ingest Add succeeded!
       00-Always: Finished SYNCHRONIZE for task 'MYTASK1'

This time ingestion succeeds and the ingest result handler is called for each document that was successfully ingested.