Skip to main content

Install the Worker/Listener

Overview

The Worker and Event Listener are vital components for real-time Data syncs. Here's a brief overview of how the Worker/Event Listener operates:

  • The Event Listener, once successfully subscribed, awaits events from the streaming source.
  • Upon receiving a message from a streaming source, the Event Listener pushes it to the message queue.
  • The Worker then retrieves the message from the message queue.
  • The Worker fetches the corresponding record from the target based on the sync key.
  • If changes are detected, the Worker pushes them to the target system. Both successes and failures get logged in the worker's log file.
caution

For a Kubernetes deployment of the Cinchy Platform, the Worker/Event Listener is automatically installed. The steps below are specific to an IIS deployment of the Cinchy Platform.

Prerequisites

SQL Service Broker setup

You must set up the Worker Queues and the SQL Service Broker prior to install.

  1. Navigate to the Cinchy Releases table and download the create_queues script from the Script Artifacts column. For access, please contact Cinchy Support
  2. On a Windows Server machine, launch an instance of PowerShell as the Administrator.
  3. Run the below command the enable the Service Broker:
ALTER DATABASE [Your Cinchy Database Name] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;
  1. To set up the worker queues , make the following changes and run the create_queues script:
-- Change [cinchy] to match your database name
USE [cinchy];
-- Update the below @user, @password, @db, and @schema values to match your configuration
DECLARE @user NVARCHAR(100) = 'cinchytst';
DECLARE @password NVARCHAR(100) = 'test';
DECLARE @db NVARCHAR(100) = 'cinchy';
DECLARE @schema NVARCHAR(100) = 'dbo';

Download the resources

  1. Navigate to the Cinchy Releases table.

Event Listener

  1. Download the latest Cinchy Event Listener.zip file from the Release Artifacts column.
  2. Extract the .zip file to your designated directory. For example, C:\your event listener folder.
  3. Run the create-cinchy-event-listener-windows-service.ps1 PowerShell script from the installation directory. Use the filePath parameter as -filePath <Path to your agent.exe file>.

Worker

  1. Download the latest Cinchy Connections.zip file from the Release Artifacts column.
  2. Unzip the content of the Cinchy Worker folder to, for example, C:\your CLI worker folder.
  3. Run the create-cinchy-cli-worker-windows-service.ps1 PowerShell script from the installation directory. Pass the filePath parameter pointing to the Cinchy.CLI.exe file.

Event Listener deployment

  1. Open the appSettings.json file in your Event Listener directory and configure:

ClientSettings

ParameterValue
URLCinchy Web URL (e.g., https://cinchy.net/Cinchy)
PasswordPassword for the user: eventlistener@cinchy.com

AppSettings

ParameterValue
GetNewListenerConfigsInterval(seconds) Frequency at which the listener checks for new configs in the [Cinchy].[Listener Configs] table. Default is 60 seconds.

ConnectionStrings

ParameterValue
SqlServerConnection string to the SQL server that hosts the Cinchy database.
  1. To start the Event Listener service:
    • Press Windows + R to access the Run box.
    • Type services.msc and press Enter.
    • From the services list, locate Cinchy Event Listener.
    • Right-click on it and select Start.

Worker Deployment

  1. Open the appSettings.json file in your Worker directory and configure:

ClientSettings

ParameterValue
URLCinchy Web URL (e.g., https://cinchy.net/Cinchy)
PasswordPassword for the user: connections@cinchy.com

AppSettings

ParameterValue
ModelCinchy. This specifies the model for the CLI.
TempDirectoryTemporary directory for the CLI to store files.

ConnectionStrings

ParameterValue
SqlServerConnection string to the SQL server that hosts the Cinchy database.
  1. To start the Worker service: - Press Windows + R to open the Run box. - Input services.msc and hit Enter. - In the list of services, find Cinchy Worker. - Right-click on the service and select Start.