Kafka rule

Use Ably’s Firehose Kafka rule to send data such as messages, occupancy, lifecycle and presence events from Ably to Kafka.

If you want to send data from Kafka to Ably, you can use the Ably Kafka Connector, rather than Kafka rules.

There are two ways to create a Kafka rule:

To create a rule in your dashboard:

  • Login and select the application you wish to integrate with Kafka.
  • Click the Integrations tab.
  • Click the New Integration Rule button.
  • Choose Firehose.
  • Choose Kafka.
  • Configure the settings applicable to your use case and your Kafka installation.
  • Click Create to create the rule.

The following explains the Kafka general rule settings:

Section Purpose
Source Select the type of event source.
Channel filter Allows filtering of the rule based on a regular expression matching the channel name.
Routing key Used to route messages to Kafka topics.
Mechanism Dropdown to select the SASL/SCRAM mechanism used for Kafka connection.
Brokers List of Kafka broker endpoints in the format `<host>:<port>`.
Another broker Option to add additional Kafka broker endpoints.

In this section you need to set up your Authentication for Kafka by selecting your preferred mechanism for authentication and providing credentials.

The supported Authentication Mechanisms are:

  • Click Create to create the rule.

See some examples of creating rules in the rules section of the Control API documentation. You can also refer to the rule section of the Control API Reference for information on creating a Kafka rule. You will need to select a ruleType of kafka.