Message-driven system
Vert.x has a feature that directly supports both the message-driven architecture and EDA. It is called an event bus. Any verticle has access to the event bus, and can send any message to any address (which is just a string) using the io.vertx.core.eventbus.EventBus class, or its cousin, io.vertx.rxjava.core.eventbus.EventBus. We are only going to use the latter, but similar (not rx-fied) functionality is available in io.vertx.core.eventbus.EventBus, too. One, or several, verticles can register themselves as a message consumer for a certain address. If several verticles are consumers for the same address, then the rxSend() method of EventBus delivers the message only to one of these consumers, using a round-robin algorithm ...
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.
Read now
Unlock full access