kafka-maxscale-cdc-connector

command module
v0.0.0-...-c874f44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2019 License: BSD-2-Clause Imports: 20 Imported by: 0

README

Kafka Maxscale CDC Connector

Stream Maxscale CDC events to Kafka.

Run

go run main.go \
-cdc-host=127.0.0.1 \
-cdc-port=4001 \
-cdc-user=cdcuser \
-cdc-password=cdc \
-cdc-database=test \
-cdc-table=names \
-cdc-uuid=e3835094-4824-4f9d-ba97-5e2ec217733b \
-kafka-brokers=kafka:9092 \
-kafka-topic=cdc-test-names \
-datadir=/tmp \
-initial-delay=1s \
-v=2

Sample SQL

DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
CREATE TABLE test.names(id INT auto_increment PRIMARY KEY, name VARCHAR(20));
INSERT INTO test.names (name) VALUES ('Hello');
INSERT INTO test.names (name) VALUES ('World');

Consome topic

go get github.com/Shopify/sarama/tools/kafka-console-consumer
kafka-console-consumer -topic=cdc-test-names -brokers=kafka:9092

Docker Compose

Sample for run Mariadb, Maxscale, Kafka, Zookeeper and the Connector inside Docker.

docker-compose up \
--force-recreate \
--build \
--detach
docker exec -ti mariadb mysql --password=123

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
cdc-print-json
Sample of read and print cdc messages
Sample of read and print cdc messages
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL