coffee
coffee copied to clipboard
Coffee Demo App
Both apps are producers and consumers at the same time, but for the purposes of the demo, producer side contract testing is set up for barista module and consumer-side contract testing is set up for waiter module.
FLOW
- Trigger new order via HTTP call in Waiter app (
@PostMapping("/order/{name}/{count}"), eg.http POST :8081/order/espresso/1 KafkaTemplateis used to place a newOrderonorderstopic- The Barista app listens on
orders; when a new order appears, it processes it into aServingand sends it toservingstopic; if the beverage name is not matched, aCoffeeNotAvailableExceptionis thrown and sent toerrorstopic - The Waiter app listens on
servingsanderrorsand logs information based on messages received on these topics