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
- Windows Server 2012+
- SQL Server 2012+
- Service Broker enabled
- Cinchy Platform
- 4 x 2 Ghz Processor
- 16-24GB RAM
SQL Service Broker setup
You must set up the Worker Queues and the SQL Service Broker prior to install.
- Navigate to the Cinchy Releases table and download the create_queues script from the Script Artifacts column. For access, please contact Cinchy Support
- On a Windows Server machine, launch an instance of PowerShell as the Administrator.
- Run the below command the enable the Service Broker:
ALTER DATABASE [Your Cinchy Database Name] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;
- 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
- Navigate to the Cinchy Releases table.
Event Listener
- Download the latest Cinchy Event Listener.zip file from the Release Artifacts column.
- Extract the .zip file to your designated directory. For example,
C:\your event listener folder
. - Run the
create-cinchy-event-listener-windows-service.ps1
PowerShell script from the installation directory. Use thefilePath
parameter as-filePath <Path to your agent.exe file>
.
Worker
- Download the latest Cinchy Connections.zip file from the Release Artifacts column.
- Unzip the content of the Cinchy Worker folder to, for example,
C:\your CLI worker folder
. - Run the
create-cinchy-cli-worker-windows-service.ps1
PowerShell script from the installation directory. Pass thefilePath
parameter pointing to the Cinchy.CLI.exe file.
Event Listener deployment
- Open the
appSettings.json
file in your Event Listener directory and configure:
ClientSettings
Parameter | Value |
---|---|
URL | Cinchy Web URL (e.g., https://cinchy.net/Cinchy) |
Password | Password for the user: eventlistener@cinchy.com |
AppSettings
Parameter | Value |
---|---|
GetNewListenerConfigsInterval | (seconds) Frequency at which the listener checks for new configs in the [Cinchy].[Listener Configs] table. Default is 60 seconds. |
ConnectionStrings
Parameter | Value |
---|---|
SqlServer | Connection string to the SQL server that hosts the Cinchy database. |
- 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.
- Press
Worker Deployment
- Open the appSettings.json file in your Worker directory and configure:
ClientSettings
Parameter | Value |
---|---|
URL | Cinchy Web URL (e.g., https://cinchy.net/Cinchy) |
Password | Password for the user: connections@cinchy.com |
AppSettings
Parameter | Value |
---|---|
Model | Cinchy. This specifies the model for the CLI. |
TempDirectory | Temporary directory for the CLI to store files. |
ConnectionStrings
Parameter | Value |
---|---|
SqlServer | Connection string to the SQL server that hosts the Cinchy database. |
- To start the Worker service: - Press
Windows + R
to open the Run box. - Inputservices.msc
and hit Enter. - In the list of services, find Cinchy Worker. - Right-click on the service and select Start.