Configuring EventBus adapters
MemoryEventBusAdapter
MemoryEventBusAdapter
Implementing your custom IEventBusAdapter
The ProxyEventBusResolver class provides an IEventBusResolver whose underlying resolver is resolved from a DI container.
EventBus middlewares let you dispatch events around a wrapped function without coupling the function itself to the event bus. Each factory takes an IEventBusResolver 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 selected event bus, 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 creates an event bus for each configured adapter. Use it to dispatch through a default adapter or select a specific adapter at runtime.