DomainEventDispatcher

class DomainEventDispatcher(name: String, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, domainEventBus: DomainEventBus, stateEventBus: StateEventBus, functionRegistrar: DomainEventFunctionRegistrar, eventHandler: DomainEventHandler, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("EventDispatcher"), metrics: WowMetrics = WowMetrics.NONE) : CompositeEventDispatcher

Domain Event Dispatcher responsible for coordinating the processing of domain events.

This class extends AbstractEventDispatcher to provide concrete implementation for handling domain events through the event bus system. It manages the lifecycle of event processing, including subscription to event streams and distribution of events to appropriate handlers.

Parameters

name

The name of this dispatcher, typically formatted as applicationName.DomainEventDispatcher

parallelism

The level of parallelism for processing events (default: DEFAULT_PARALLELISM)

domainEventBus

The domain event bus for publishing and subscribing to domain events

stateEventBus

The state event bus for handling state-related events

functionRegistrar

The registrar for domain event handler functions

eventHandler

The event handler for processing domain events

schedulerSupplier

Supplier for creating schedulers for aggregate processing

metrics

Instance-scoped metrics recorder propagated to child dispatchers

See also

Constructors

Link copied to clipboard
constructor(name: String, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, domainEventBus: DomainEventBus, stateEventBus: StateEventBus, functionRegistrar: DomainEventFunctionRegistrar, eventHandler: DomainEventHandler, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("EventDispatcher"), metrics: WowMetrics = WowMetrics.NONE)