- All Implemented Interfaces:
DefaultEventBusprovides the default and very efficient implementation of the
It is built on top of a very fast, bounded MPSC (multi-producer single-consumer) queue which allows to quickly send events into the bus without blocking the sender.
Subscribers of this API are considered to be non-blocking and if they have to blocking tasks need to fan them out into their own thread pool.
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description
publish(Event event)Try to publish an event.
stop(Duration timeout)Stops the
public EventSubscription subscribe(Consumer<Event> consumer)
public void unsubscribe(EventSubscription subscription)
public EventBus.PublishResult publish(Event event)Try to publish an event.