-
s: captured events are rerouted from their chunk-specific topics to a single logical topic
named according to the following pattern:
<topic.prefix>.<hypertable-schema-name>.<hypertable-name> -
s: captured events are rerouted from their chunk-specific topics to a single logical topic
named according to the following pattern:
<topic.prefix>.<aggregate-schema-name>.<aggregate-name> - : if you enable , the Debezium connector does not apply any special processing to data in the . Compressed chunks are forwarded unchanged to the next downstream job in the pipeline for further processing as needed. Typically, messages with compressed chunks are dropped, and are not processed by subsequent jobs in the pipeline. This limitation only affects changes to chunks in the . Changes to data in the work correctly.
Prerequisites
To follow the steps on this page:- Create a target instance.
- Install Docker on your development machine.
Configure your database to work with Debezium
To set up to communicate with Debezium:
-
Configure your self-hosted deployment
-
Open
postgresql.conf. The configuration files are usually located in:- Docker:
/home/postgres/pgdata/data/ - Linux:
/etc/postgresql/<version>/main/or/var/lib/pgsql/<version>/data/ - MacOS:
/opt/homebrew/var/postgresql@<version>/ - Windows:
C:\Program Files\PostgreSQL\<version>\data\
- Docker:
-
Enable logical replication.
Modify the following settings in
postgresql.conf: -
Open
pg_hba.confand enable host replication. To allow replication connections, add the following:This permission is for thedebeziumuser running on a local or Docker deployment. For more about replication permissions, see Configuring to allow replication with the Debezium connector host. - Restart .
-
Open
-
Connect to your instance
Use
psql. -
Create a Debezium user in
Create a user with the
LOGINandREPLICATIONpermissions: -
Enable a replication spot for Debezium
-
Create a table for Debezium to listen to:
-
Turn the table into a hypertable:
Debezium also works with s.
-
Create a publication and enable a replication slot:
-
Create a table for Debezium to listen to:
Configure Debezium to work with your database
Set up Kafka Connect server, plugins, drivers, and connectors:-
Run Zookeeper in Docker
In another Terminal window, run the following command:
Check the output log to see that zookeeper is running.
-
Run Kafka in Docker
In another Terminal window, run the following command:
Check the output log to see that Kafka is running.
-
Run Kafka Connect in Docker
In another Terminal window, run the following command:
Check the output log to see that Kafka Connect is running.
-
Register the Debezium source connector
Update the
propertiesfor thedebezium-useryou created in your instance in the following command. Then run the command in another Terminal window: -
Verify
timescaledb-source-connectoris included in the connector list- Check the tasks associated with
timescaledb-connector:You see something like:
- Check the tasks associated with
-
Verify
timescaledb-connectoris running-
Open the Terminal window running Kafka Connect. When the connector is active, you see something like the following:
-
Watch the events in the accounts topic on your instance.
In another Terminal instance, run the following command:
You see the topics being streamed. For example:
-
Open the Terminal window running Kafka Connect. When the connector is active, you see something like the following: