Debezium Cassandra CDC Source Connector
Type |
source |
Class |
|
Target System |
Apache Cassandra |
Maintainer |
Debezium / Red Hat |
License |
Apache License 2.0 |
Project |
|
Download |
|
This page documents version 3.5.0.Final. Newer versions should be compatible unless there are breaking changes, but field names or default values may differ. If you notice discrepancies, please contact Axual Support. |
| The Debezium Cassandra connector has a fundamentally different architecture from other Debezium connectors. It runs as a standalone JVM process co-located with the Cassandra node rather than as a standard Kafka Connect connector. Deploying it alongside a Connect cluster requires additional operational planning. See the official source connector documentation for details. |
Description
The Debezium Cassandra CDC Source Connector captures change events from Apache Cassandra by reading the Cassandra commit log and publishes them as records to Kafka topics.
It is maintained by the Debezium community as part of the open-source github.com/debezium/debezium.
Unlike other Debezium connectors, this connector reads commit log files directly from the Cassandra node filesystem. It does not require schema history Kafka topics and does not use LogMiner or change tables.
Features
-
Change Data Capture (CDC) from Cassandra tables by reading commit log files
-
Captures inserts, updates, and deletes
-
Does not require schema history Kafka topics
-
Stream name follows the convention
<keyspace>.<table>
When to Use
-
You need CDC from Cassandra tables into Kafka.
-
You want to capture all write events at the commit-log level.
When NOT to Use
-
You only need to read existing Cassandra data without CDC — use the Cassandra Source Connector instead.
-
Your operational environment does not allow a sidecar process co-located with Cassandra nodes.
Installation
The connector is available from the Debezium Releases.
Cassandra 3.x and Cassandra 4.x use different connector classes. For Cassandra 4.x use
io.debezium.connector.cassandra4.Cassandra4Connector. Check the
official source connector documentation for the correct class name for your version.
|
-
Navigate to the releases page and select the version matching your Cassandra installation.
-
Download the connector archive.
-
Deploy the connector process on each Cassandra node following the official source connector documentation.
For how a plugin reaches the workers, see Configure plugins.
Configuration
For the complete configuration reference, see the official source connector documentation.
| To configure a connector in Axual Self-Service, see Starting Connectors. |
Getting Started
Prerequisites
Cassandra instance with CDC enabled
You need a running Cassandra instance with CDC enabled for the target table.
Enable CDC on the target keyspace and table:
-- Enable CDC when creating a table
CREATE TABLE my_keyspace.HOTEL (
hotel_id UUID PRIMARY KEY,
hotel_name TEXT
) WITH cdc = true;
-- Or enable CDC on an existing table
ALTER TABLE my_keyspace.HOTEL WITH cdc = true;
Also ensure cdc_enabled: true is set in cassandra.yaml on each node.
Axual streams
Follow the Creating topics documentation to create and deploy the following streams:
-
cassandra_nickname.my_keyspace.HOTEL— Contains DB events for theHOTELtable.
Stream name follows the pattern<nickname>.<keyspace>.<table>. Create one per watched table.
All streams should use Key/Value type String/String, Partition count 1, Retention Time 157680000000 (5 years).
Steps
Step 1 — Create a connector application
-
Follow the Configure and install a connector documentation to set up a new Connector-Application.
Let’s call itmy_cassandra_cdc_app.
The plugin name isio.debezium.connector.cassandra.CassandraConnector.
If a plugin isn’t available, ask a platform operator to install it on the cluster. A newly installed plugin stays unavailable until someone runs refresh the cluster’s plugin list.
Step 2 — Configure the connector
-
Provide the following minimal configuration:
cassandra.hostsExample value:
123.123.123.123cassandra.port9042kafka.producer.bootstrap.serversYour Kafka bootstrap server address
http.port8080commitLogTransfer.fullyQualifiedClassNameio.debezium.connector.cassandra.BlackHoleCommitLogTransfer -
Refer to the official source connector documentation for the full set of required properties.
Step 3 — Start the connector
Start the connector process on each Cassandra node.
Authorize the my_cassandra_cdc_app source connector application to produce to all target streams in
Axual Self-Service.
Known limitations
-
Cassandra CDC must be enabled on both the cluster (
cassandra.yaml) and the individual table. -
The connector runs as a sidecar process co-located with Cassandra nodes — it cannot be managed through the standard Kafka Connect REST API.
-
Cassandra 3.x and 4.x use different connector classes — verify the correct class for your version.
License
Debezium source connector is licensed under the Apache License, Version 2.0.