IDomainEventPublisher
Defined in: packages/core/application/ports/domain-event-publisher.port.ts:20
Publishes the buffered domain events of an aggregate after a command succeeds.
Any bus with a publishAll(events) method fits, including the NestJS CQRS
EventBus, so a Nest handler passes its injected EventBus unchanged.
CommandBaseHandler passes the aggregate as dispatcherContext, which the
NestJS EventBus hands to its configured publisher.
Example
Section titled “Example”Methods
Section titled “Methods”publishAll()
Section titled “publishAll()”publishAll(
events,dispatcherContext?):unknown
Defined in: packages/core/application/ports/domain-event-publisher.port.ts:21
Parameters
Section titled “Parameters”events
Section titled “events”IEvent[]
dispatcherContext?
Section titled “dispatcherContext?”unknown
Returns
Section titled “Returns”unknown