stream replication debezium - ghdrako/doc_snipets GitHub Wiki

Debezium

Documentation

Examples (composer)

Tutorials

Using PubSub

Full refresh:

Postgres

Debezium’s supported logical decoding plug-ins,

Debezium sink options:

​​Debezium provides a ready-to-use application that streams change events from a source database to messaging infrastructure like

  • Amazon Kinesis,
  • Google Cloud Pub/Sub,
  • Apache Pulsar or
  • Redis (Stream)

Examples

Architecture

obraz

Implementation Debezium

  • Kafka Connect
  • Debezium Embedded Engine and
  • Debezium Server

Kafka Connect is a framework and runtime for implementing and operating:

Kafka Connect operates as a separate service besides the Kafka broker.

Debezium Server (using Pub-Sub)

The Debezium server is a configurable, ready-to-use application that streams change events from a source database to a variety of messaging infrastructures.

Debezium Engine

library embedded into your custom Java applications.

Example

Debezium Kafka Connect configuration for PostgreSQL

{
"name": "visits-connector",
  "config": {
    "connector.class":
    "io.debezium.connector.postgresql.PostgresConnector",
    "database.hostname": "postgres",
    "database.port": "5432",
    "database.user": "postgres",
    "database.password": "postgres",
    "database.dbname" : "postgres",
    "database.server.name": "dbserver1",
    "schema.include.list": "dedp_schema",
    "topic.prefix": "dedp"
  }
}

It defines the connection parameters, all the schemas to include in the watching operation, and finally the prefix for the created topic for each synchronized table. As a result, if there is a dedp_schema.events table, the connector will write all the changes to the dedp.dedp_schema.events topic.