Subscribing to Event Streams

1. Listener Configs Table Columns

To subscribe to an event stream, make sure you have a Cinchy Listener running connected to the Cinchy instance you are on. You will need to create a record in the Listener Configs table and Enable it to subscribe to events.
Event Connector Type
Choose the connector type
Refer to the topic JSON of the connector type you are configuring.
Connection Attributes
Refer to the connection attributes JSON of the connector type you are configuring.
Make sure you set the value to Disabled when creating the config for the first time. This will give you a chance to correctly configure the listener before it is picked up by the service. After configuring the listener correctly you should flip the value to Enabled.
Data Sync Config
CLI Sync Configuration you want to use to sync records from your real time sync.
Subscription Expires On
This field is a timestamp that is populated by some Event Listeners (eg. Salesforce) service when it has successfully subscribed to a topic.
If there are any errors in the configuration, the Event Listener will disable the topic and write the error message here.
Auto Offset Reset
Earliest, Latest or None. This value is used when either there is no last message ID, or when the last message ID is invalid. Earliest will start reading from the beginning on the queue, latest will wait for the next message, and none will shut down that listener.
User-friendly display name

2. Testing an Event Stream

Once you have created your listener configuration, you can switch the status to Enabled. If there is a Cinchy Listener running pointing to this Cinchy Platform instance, it will attempt to subscribe to the specified event stream.

3. Listener Topics - Additional Attributes

The following attributes may be used in the Listener Config Topic column.

3.1 messageKeyExpression

Each of your Event Listener message keys a message key. By default, this key is dictated by the Cinchy ID of the record being changed.
When the worker processes your Event Listener messages, it does so in batches, and for efficiency and to guarantee order, messages that contain the same key will not be processed in the same batch.
The messageKeyExpression property allows you to change the default message key to something else.

Possible Use Case

  • Ensuring records with the same message key can be updated with the proper ordering to reflect an accurate collaboration log history.

Example Syntax

In this example, we want the message key to be based on the [Employee Id] and [Name] column of the table that CDC is enabled on.
{ "messageKeyExpression": "CONCAT(New.[Employee Id], '-', New.[Name])", … }
Copy link
On this page
1. Listener Configs Table Columns
2. Testing an Event Stream
3. Listener Topics - Additional Attributes
3.1 messageKeyExpression