AggregateEventDispatcher

class AggregateEventDispatcher(val name: String = "-", val namedAggregate: NamedAggregate, val messageFlux: Flux<EventStreamExchange>, 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<EventStreamExchange>

Dispatcher for processing domain events within a specific aggregate context.

This class handles the distribution and processing of domain event streams for a particular named aggregate. It extends AbstractAggregateEventDispatcher to provide concrete implementation for event stream processing.

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<EventStreamExchange>, 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 AggregateEventDispatcher 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<EventStreamExchange>

The flux of event stream 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 domain event exchange from an event stream exchange and domain event.