Skip to main content
The kafka write mode buffers data in Kafka before writing it to ClickHouse. This mode is useful when you have a high volume of data and want to avoid overwhelming ClickHouse. This mode takes advantage of ClickHouse’s kafka table engine.

Setup

To set up Dittofeed with the kafka write mode, you can make use of the following environment variables:

ClickHouse Kafka SASL Configuration

When using Kafka with SASL authentication, ClickHouse requires additional configuration in its config file. Create or modify the ClickHouse configuration file to include SASL settings:
For SSL-enabled Kafka connections, use:
SASL authentication settings cannot be configured at the table level in ClickHouse and must be set in the server configuration file. ClickHouse requires a restart when SASL configuration changes.

Bootstrap

Finally, you can run the bootstrap script to create the necessary Kafka topic: