Repository for spring-boot-event-driven
| Module | Description |
|---|---|
| API Gateway | Gateway for load balancer (if needed) |
| Service Discovery | Service to register sub modules (if needed) |
- JDK 1.8
- PostgreSQL : Create several database using
database.sqlfile - Apache Kafka
# this will install java 1.8, zookeeper, and kafka $ brew install kafka # this will run ZK and kafka as services $ brew services start zookeeper $ brew services start kafka- Start Zookeeper, then Kafka
- Open
application.ymlConfigure Database based on your own installation
db: name : db_name host : db_host port : 5432 username : db_uname password : db_pass auto-reconnect : true ssl : false - Run each main class using your own IDE as Spring Boot Application for
order-api,customer-api,inventory-api,payment-api,product-api - When all services already run, send payload through Rest Client into
http://localhost:8080/order/startusing this payload
{ "transactionCode" : "01", "customer" : { "name" : "customer_01" }, "order" : { "totalPrice" : 5000.0, "orderDetails" :[ { "productId" : 1, "quantity" : 1, "price" : 5000.0 } ] }, "payment" : { "paymentTotal" : 5000.0, "paymentType" : "cash", "paymentStatus" : "paid" } } 

