Using events is a powerful alternative to REST-based communication in microservices. However, it comes with its own challenges: For instance, dealing with eventual consistency, synchronisation of state, and writing code which can handle asynchronous business logic.
In this talk we explain how we use Spring 5’s powerful reactive features (such as WebFlux and Project Reactor) to build an event-driven microservice application for a crypto currency trading platform. We make use of the Axon Framework for implementing CQRS and Event Sourcing. Spring WebFlux is used to handle scenarios were we need the translation from asynchronous domain services to synchronous responses in the mobile app. We chose this approach, because it provides a better user experience when feedback is immediately available after performing an action. We explain how we deal with issues you run into when adopting a new technology, and how the solution integrates with other Spring modules like Spring Cloud and Spring Security.
The attendees of this talk can expect to learn about:
* How reactive programming helps with asynchronous flows
* How to use Spring WebFlux with CQRS and Event Sourcing
* How to use Axon framework together with the Spring stack