Skip to Content
Hands-On Reactive Programming in Spring 5
book

Hands-On Reactive Programming in Spring 5

by Oleh Dokuka, Igor Lozynskyi
October 2018
Intermediate to advanced
556 pages
15h 18m
English
Packt Publishing
Content preview from Hands-On Reactive Programming in Spring 5

Event-driven architecture

The best way to implement a distributed business transaction in a microservice environment is through an event-driven architecture, which we have explored a few times throughout this book so far.

If it is required to change the state of the system, the first service changes its data in its own database, and the same inner transaction publishes an event to a message broker. So, even if transactions are involved, they do not cross the boundary of the service. The second service, which registers the subscription to the required type of events, receives events and changes its storage accordingly, as well as possibly sending an event. The services are not blocked together and do not depend on each other; the only coupling ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Spring Microservices in Action, Second Edition

Spring Microservices in Action, Second Edition

John Carnell, Illary Huaylupo Sanchez

Publisher Resources

ISBN: 9781787284951Supplemental Content