Configuring EventBus adapters
MemoryEventBusAdapter
MemoryEventBusAdapter
Implementing your custom IEventBusAdapter
EventBus middlewares let you dispatch events around a wrapped function without coupling the function itself to the event bus. Each factory takes an IEventDispatcher (such as an EventBus) and returns a middleware configured with an event type and a payload invocable. The payload is resolved from the wrapped function's arguments (and, where applicable, its return value or caught error) and dispatched on the provided dispatcher, while the wrapped function's result (or thrown error) passes through unchanged. If the payload resolves to null (i.e. it doesn't return a value), no event is dispatched.
withEventBusPrefix plugin
The eridu-tech/event-bus component provides a way for dispatching and listening to events independent of underlying technology.
The EventBusResolver class provides a flexible way to configure and switch between different event-bus adapters at runtime.