AbstractEventDispatcher

abstract class AbstractEventDispatcher<R : Mono<*>> : MessageDispatcher

Abstract base class for event dispatchers that coordinate domain and state event processing.

This class manages the lifecycle of event processing across multiple aggregates, handling both domain events and state events. It subscribes to event buses, groups events by aggregate, and creates appropriate dispatchers for each aggregate.

Parameters

R

The return type of processing operations (typically Mono)

See also

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Subscriber that distributes domain events to aggregate-specific dispatchers.

Link copied to clipboard

Subscriber that distributes state events to aggregate-specific dispatchers.

Properties

Link copied to clipboard

The domain event bus for handling domain events.

Link copied to clipboard

The handler responsible for processing events.

Link copied to clipboard

The registrar containing event processing functions.

Link copied to clipboard
abstract val name: String
Link copied to clipboard
abstract val parallelism: Int

The level of parallelism for processing events.

Link copied to clipboard

The state event bus for handling state-related events.

Functions

Link copied to clipboard
open override fun close()

Closes the event dispatcher and cancels all subscriptions.

Link copied to clipboard
open override fun run()

Starts the event dispatcher by subscribing to event streams.