ProjectionDispatcher
class ProjectionDispatcher(name: String, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, domainEventBus: DomainEventBus, stateEventBus: StateEventBus, functionRegistrar: ProjectionFunctionRegistrar, eventHandler: ProjectionHandler, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("ProjectionDispatcher")) : CompositeEventDispatcher
Dispatcher for projections that handles domain events and coordinates projection processing. This dispatcher extends CompositeEventDispatcher to provide event-driven processing for projections that transform domain events into read models or perform side effects.
Parameters
name
The name of the dispatcher, typically formatted as applicationName.ProjectionDispatcher.
parallelism
The number of parallel threads for processing messages (default: MessageParallelism.DEFAULT_PARALLELISM).
domainEventBus
The bus for publishing domain events.
stateEventBus
The bus for publishing state events.
functionRegistrar
The registrar for projection functions.
eventHandler
The handler for processing domain events.
schedulerSupplier
The supplier for aggregate schedulers (default: DefaultAggregateSchedulerSupplier with "ProjectionDispatcher" prefix).
Constructors
Link copied to clipboard
constructor(name: String, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, domainEventBus: DomainEventBus, stateEventBus: StateEventBus, functionRegistrar: ProjectionFunctionRegistrar, eventHandler: ProjectionHandler, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("ProjectionDispatcher"))