EDA Examples
Working code examples of Event Driven Architectures (EDA) using ZenWave SDK.
AsyncAPI Shopping Cart
This example demonstrates how to use AsyncAPI together with Avro schemas and the ZenWaveSDK AsyncAPI Generator to build a complete event-driven shopping cart application.
You will learn how to:
- define a multi-message AsyncAPI contract using Avro schemas
- generate complete Kafka producers and consumers using ZenWaveSDK
- use generated code to produce and consume events in a Spring Boot application, focusing only on your business logic
EDA-TransactionalOutbox-Modulith-JPA
Implementing a Transactional OutBox With AsyncAPI, SpringModulith and ZenWaveSDK.
We’ll explore how we can implement a Transactional Outbox Pattern to:
- Persist data to a supported transactional database (e.g., SQL or MongoDB).
- Send events to an external message broker like Kafka or RabbitMQ using Spring Cloud Stream.
- Leverage Spring Modulith Events transactional features.
- Use ZenWaveSDK Code Generator for AsyncAPI so you don’t need to write a single line of boilerplate code for the transactional outbox and event publishing.
Code Repository: https://github.com/EDALearn/EDA-TransactionalOutbox-Modulith-JPA
Follow detailed instructions at https://www.zenwave360.io/posts/TransactionalOutBoxWithAsyncAPIAndSpringModulith

EDA-Playground-Online-Food-Delivery (Microservices)
SpringBoot Microservices for a "Food Delivery Service" using OpenAPI and AsyncAPI for inter-service communication.
https://github.com/EDALearn/EDA-Playground-Online-Food-Delivery
EDA-Playground-Online-Food-Delivery (Modulith)
SpringBoot Modulith for a "Food Delivery Service" using Spring Modulith Events for inter-module communication.
https://github.com/EDALearn/EDA-Modulith-Playground