In-memory publish/subscribe event bus for domain events.
publish<T>(event: IDomainEvent<T>): Promise<void>
Publishes an event to every subscriber of its type.
publishBatch(events: IDomainEvent[]): Promise<void>
Publishes multiple events, each to its own subscribers.
subscribe<T>(type: string,handler: EventHandler<T>): Unsubscribe
Subscribes to an event type.