This mono repo contains two microservices projects wich I used to implement Asynchronous communication between them, using Kafka.
- Docker and Docker Compose installed on your machine.
-
Clone the Repository
git clone https://github.com/charlybutar21/microservice-kafka.git
-
Start RabbitMQ with Docker
cd microservice-kafka docker-compose up
-
Run Microservices
Run producer-service and consumer-service.
-
Send a Request
http://localhost:8080/order Content-Type: application/json { "item": "Mie Goreng", "amount": 30000 }
-
Verify the Data
Open http://localhost:8081/h2-console,
url: jdbc:h2:mem:testdb,
username: sa
password: password