https://github.com/kuper-tech/outbox-example-apps
sbmt-outbox example applications
https://github.com/kuper-tech/outbox-example-apps
Last synced: 9 months ago
JSON representation
sbmt-outbox example applications
- Host: GitHub
- URL: https://github.com/kuper-tech/outbox-example-apps
- Owner: Kuper-Tech
- Created: 2024-02-29T06:46:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-29T08:52:58.000Z (almost 2 years ago)
- Last Synced: 2024-08-29T10:12:37.076Z (almost 2 years ago)
- Language: Ruby
- Size: 89.8 KB
- Stars: 25
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Outbox example apps
These are example applications that use:
- [sbmt-outbox](https://github.com/SberMarket-Tech/sbmt-outbox)
- [sbmt-kafka_producer](https://github.com/SberMarket-Tech/sbmt-kafka_producer)
- [sbmt-kafka_consumer](https://github.com/SberMarket-Tech/sbmt-kafka_consumer)
## How to run
1. Install [Dip](https://github.com/bibendi/dip)
2. Start [Quest](./quest/) application `cd quest && dip infra up && dip up`
3. Start [Voyage](./voyage/) application `cd voyage && dip infra up && dip up`
## Test case
1. Create an order in the Quest app
```shell
curl -L http://quest.lvh.me/api/v1/orders -F '[order]name=Foo' -F '[order]qty=3' -F '[order]price=42'
```
2. Send the order to the Voyage app with Outbox pattern
```shell
curl -X POST -L http://quest.lvh.me/api/v1/orders/ORDER-ID/completion
```
3. Show the imported order in the Voyage app
```shell
curl -L http://voyage.lvh.me/api/v1/orders/ORDER-ID
```
## Troubleshooting
Sometimes Kafka broker doesn't receive a message into the topic. In this case:
- stop all applications with `dip down`
- stop infra containers with `dip infra down`
- delete kafka volumes with `docker volume rm dip-infra-kafka-latest_kafka dip-infra-kafka-latest_zookeeper`