Giter Club home page Giter Club logo

warpstream_debezium's Introduction

WarpStream with Debezium

Trying out WarpStream as a Kafka alternative with Debezium. Read more about what WarpStream from Kafka is dead, long live Kafka

Install the Warpstream agent locally using

curl https://console.warpstream.com/install.sh | bas

Log in to the Warpstream console to get your pool name, Cluster ID and API key at https://console.warpstream.com

Start the agent locally using the following command with an s3 bucket and WarpStream details added:

warpstream agent -agentPoolName apn_default -bucketURL mem://my-test-bucket -apiKey aks_xxxxxxxxxx -defaultVirtualClusterID vci_xxxxxxxxxx

Use Docker Compose to start Mariadb and Debezium containers to try to out CDC:

version: '3.1'
services:
  mariadb:
    image: mariadb:latest
    environment:
      MYSQL_ROOT_PASSWORD: root_password
      MYSQL_DATABASE: test_db
    ports:
      - "3306:3306"

  debezium:
    image: debezium/connect:latest
    depends_on:
      - mariadb
    environment:
          BOOTSTRAP_SERVERS: api-xxxxxxxxxx.discovery.prod-z.us-east-1.warpstream.com:9092
          CONFIG_STORAGE_TOPIC: debezium_connect_config
          OFFSET_STORAGE_TOPIC: debezium_connect_offsets
    volumes:
      - ./debezium/connector.json/:/kafka/connector.json

Create an initial Connector JSON file for Debezium using the following JSON:

{
    "name": "connector",
    "config": {
        "connector.class": "io.debezium.connector.mysql.MySqlConnector",
        "tasks.max": "1",
        "database.hostname": "mariadb",
        "database.port": "3306",
        "database.user": "root",
        "database.password": "root_password",
        "database.server.id": "12345",
        "database.server.name": "test_db",
        "database.whitelist": "test_db",
        "table.whitelist": "*",
        "database.history.kafka.bootstrap.servers": "localhost:9092",
        "database.history.kafka.topic": "dbhistory.database1"
    }
}

Run docker-compose up -d and connect to the Debezium container:

docker exec -it warpstream-debezium-1 /bin/bash

Create a Connector in Debezium:

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8083/connectors -d @/kafka/connector.json

Check Connectors:

curl localhost:8083/connectors

warpstream_debezium's People

Contributors

gordonmurray avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.