docker-compose up
ms-user
: http://localhost:3000/ms-user
http POST http://localhost:8083/connectors/ < ms-user/src/connector.json
Create a user example
http POST http://localhost:3000/ms-user/user name=Gonzaga [email protected]
So, just go to kafdrop on topic specified in the connector and see the message something like:
{
"before":null,
"after":{
"id":2,
"type":"CREATE",
"aggregate_type":"Users",
"aggregate_id":1,
"payload":"{\"name\":\"Gonzaga\",\"email\":\"[email protected]\"}"
},
"source":{
"version":"1.0.2.Final",
"connector":"mysql",
"name":"db-ms-user",
"ts_ms":1583417056000,
"snapshot":"false",
"db":"ms_user",
"table":"outbox",
"server_id":1,
"gtid":null,
"file":"binlog.000022",
"pos":520,
"row":0,
"thread":12,
"query":null
},
"op":"c",
"ts_ms":1583417056193
}
IMPORTANT: You can format this message for make more sense on this pattern. See Avro
Database console
docker run -it --rm --name mysqlterm --network microservicedebeziumoutbox_default --link db-ms-user --rm mysql:5.7 sh -c 'exec mysql -h db-ms-user -uroot -ptoor -D ms_user'
Go to localhost:9000 to see topics