Options for the EventsPlugin.
handlers: readonly EventHandlerRegistration[]
Handlers subscribed to the bus at register() time.
The declarative alternative to resolving CAPABILITIES.EVENTS and calling
subscribeHandler imperatively — which application code has no phase to do, since
IApplication exposes no lifecycle hooks and the bus does not exist until this
plugin has registered. Both routes go through the same subscribeHandler, so
neither can drift from the other.
The Unsubscribe each subscription returns is deliberately dropped: the bus is
cleared on shutdown (onClose), and there is no caller that could hold the
handle.
Default: [] (no subscriptions).
async: boolean
Dispatch policy for event handlers.
false(default):publish/publishBatchawait all handlers before resolving (deterministic ordering).true: fire-and-forget;publishresolves immediately, handler errors are routed toerrorHandlerasynchronously.
errorHandler: (error: unknown,event: IDomainEvent) => void
Handler for errors thrown/rejected by event handlers.
Defaults to logging via the optional logger capability if present, else
a no-op. Errors never cause publish to reject.