AbstractAggregateEventDispatcher

abstract class AbstractAggregateEventDispatcher<E : MessageExchange<*, DomainEventStream>>(messageReadiness: Mono<Void> = Mono.empty(), processingAdmission: () -> Unit = {}, processingQuiescence: () -> Unit = {}, metrics: WowMetrics) : AggregateDispatcher<E>

Abstract base class for aggregate event dispatchers.

This class provides the foundation for dispatching domain events to appropriate handlers within an aggregate context. It manages the processing of event streams, filtering events through registered functions, and coordinating with event handlers.

Parameters

messageReadiness

Completes when the message transport can retain new work

processingAdmission

Opens transport processing after dispatcher demand

processingQuiescence

Revokes transport processing before source cancellation

metrics

Instance-scoped metrics recorder for dispatcher operations

Type Parameters

E

The type of message exchange being handled

See also

Inheritors

Constructors

Link copied to clipboard
constructor(messageReadiness: Mono<Void> = Mono.empty(), processingAdmission: () -> Unit = {}, processingQuiescence: () -> Unit = {}, metrics: WowMetrics)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The handler responsible for processing individual events.

Link copied to clipboard

The registrar containing event processing functions.

Functions

Link copied to clipboard

Creates a domain event exchange for the given event.

Link copied to clipboard
open override fun handleExchange(exchange: E): Mono<Void>

Handles a message exchange by processing all events in the stream.

Link copied to clipboard
open override fun E.toGroupKey(): Int

Converts the exchange to a group key for parallel processing.