Giter VIP home page Giter VIP logo

debezium-artemis-poc's Introduction

Debezium to ActiveMQ artemis - PoC

Quick start

# Start an activeMQ instance
docker run -it --rm -p 8161:8161 -p 61616:61616 vromero/activemq-artemis

# Start an MySQL example database
docker run -it --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=debezium -e MYSQL_USER=mysqluser -e MYSQL_PASSWORD=mysqlpw debezium/example-mysql:1.2

# Run debezium engine
mvn exec:java@MyDebeziumEngine

Now you'll have the essential components running. To verify if the CDC events are correctly propagated:

# Run ActiveMQ listener (in seperate console)s
mvn exec:java@Listener

# Make some changes in MySQL (password see config file)
docker exec -it mysql bin/bash
mysql -u mysqluser -p
use inventory;
UPDATE customers SET first_name = "John" where id = "1001";

Development

Some usefull mysql commands:

docker exec -it mysql bin/bash

# login as root user
mysql -u root -p 
SELECT host,user,authentication_string FROM mysql.user;
SHOW GRANTS FOR 'mysqluser';

# add require grants for application user
GRANT SUPER ON *.* TO 'mysqluser'@'%';
GRANT RELOAD ON *.* TO 'mysqluser'@'%';
GRANT REPLICATION SLAVE ON *.* TO 'mysqluser'@'%';

GRANT REPLICATION CLIENT, SUPER ON *.* TO 'mysqluser'@'%';

GRANT ALL ON *.* TO 'mysqluser'@'%';

# login as same user as java app
mysql -u mysqluser -p
show databases;
use inventory;

# Example statements
show tables;
SELECT * FROM customers;

INSERT INTO customers VALUES ( 1005, 'John', 'Gandalf', '[email protected]');
INSERT INTO customers (first_name, last_name, email) VALUES ( 'John', 'Gandalf', '[email protected]');

UPDATE customers SET email = "[email protected]" WHERE id = '1005';

Login into artemis web console:

Open browser on http://127.0.0.1:8161/

  • username: artemis
  • password: simetraehcapa

Reference:

debezium-artemis-poc's People

Contributors

samuelcastle avatar

Stargazers

Gustav Beije avatar  avatar Moncef AOUDIA avatar

Forkers

shaikhanas1993

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.