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.

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"))

Properties

Link copied to clipboard
open override val name: String

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

Functions

Link copied to clipboard
open override fun close()

Closes this resource by performing a graceful shutdown.

Link copied to clipboard
open override fun start()

Starts the composite event dispatcher by initializing and starting both the event stream dispatcher and state event dispatcher.

Link copied to clipboard
open fun stop()

Synchronously closes this resource with graceful shutdown.

open fun stop(timeout: Duration)

Synchronously closes this resource with graceful shutdown within a specified timeout.

Link copied to clipboard
open override fun stopGracefully(): Mono<Void>

Stops the composite event dispatcher gracefully by stopping both the event stream dispatcher and state event dispatcher.