AggregateStateEventDispatcher

class AggregateStateEventDispatcher(val name: String = "-", val namedAggregate: NamedAggregate, val messageFlux: Flux<StateEventExchange<*>>, val parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, val functionRegistrar: MessageFunctionRegistrar<MessageFunction<Any, DomainEventExchange<*>, Mono<*>>>, val eventHandler: EventHandler, val scheduler: Scheduler, messageReadiness: Mono<Void> = Mono.empty(), processingAdmission: () -> Unit = {}, processingQuiescence: () -> Unit = {}, metrics: WowMetrics = WowMetrics.NONE) : AbstractAggregateEventDispatcher<StateEventExchange<*>>

Dispatcher for processing state events within a specific aggregate context.

This class handles the distribution and processing of state events for a particular named aggregate. It extends AbstractAggregateEventDispatcher to provide concrete implementation for state event processing, including access to aggregate state.

Parameters

messageReadiness

Completion of asynchronous message-source setup when this dispatcher is registered directly with a runtime

processingAdmission

Explicit transport-processing gate opened by start

processingQuiescence

Logical transport gate closed by quiesce

metrics

Instance-scoped metrics recorder for dispatcher operations

See also

Constructors

Link copied to clipboard
constructor(name: String = "-", namedAggregate: NamedAggregate, messageFlux: Flux<StateEventExchange<*>>, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, functionRegistrar: MessageFunctionRegistrar<MessageFunction<Any, DomainEventExchange<*>, Mono<*>>>, eventHandler: EventHandler, scheduler: Scheduler, messageReadiness: Mono<Void> = Mono.empty(), processingAdmission: () -> Unit = {}, processingQuiescence: () -> Unit = {}, metrics: WowMetrics = WowMetrics.NONE)

Creates a new AggregateStateEventDispatcher with the specified parameters

Properties

Link copied to clipboard
open override val eventHandler: EventHandler

The handler for processing individual events

Link copied to clipboard

The registrar containing event processing functions

Link copied to clipboard
open override val messageFlux: Flux<StateEventExchange<*>>

The flux of state event exchanges to process

Link copied to clipboard
open override val name: String

The name of this dispatcher (default: derived from aggregate name)

Link copied to clipboard
open override val namedAggregate: NamedAggregate

The named aggregate this dispatcher handles

Link copied to clipboard
open override val parallelism: Int

The level of parallelism for processing (default: DEFAULT_PARALLELISM)

Link copied to clipboard
open override val scheduler: Scheduler

The scheduler for managing event processing concurrency

Functions

Link copied to clipboard

Creates a state domain event exchange from a state event exchange and domain event.