Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rafaelgss/microservice-debezium-outbox
POC - Outbox Pattern refers my article/talk
https://github.com/rafaelgss/microservice-debezium-outbox
Last synced: 2 days ago
JSON representation
POC - Outbox Pattern refers my article/talk
- Host: GitHub
- URL: https://github.com/rafaelgss/microservice-debezium-outbox
- Owner: RafaelGSS
- Created: 2019-09-23T20:04:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T11:07:27.000Z (about 1 year ago)
- Last Synced: 2024-05-01T18:07:39.122Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 129 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# microservice-debezium-outbox
```sh
docker-compose up
```## Kafka
- Zookeeper
- Kafdrop - http://localhost:9000## Gateway
- `ms-user`: http://localhost:3000/ms-user
## After up
```sh
http POST http://localhost:8083/connectors/ < ms-user/src/connector.json
```Create a user example
```sh
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](https://debezium.io/documentation/reference/configuration/avro.html)
## Debug
Database console
```sh
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