AbstractDispatcher

Abstract base class for message dispatchers that manage multiple aggregate dispatchers.

This class coordinates the dispatching of messages to multiple named aggregates by creating individual dispatchers for each aggregate and managing their lifecycle.

Parameters

T

The type of message being dispatched

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val name: String

Functions

Link copied to clipboard
open override fun close()

Closes the dispatcher and all its aggregate dispatchers.

Link copied to clipboard
abstract fun newAggregateDispatcher(namedAggregate: NamedAggregate, messageFlux: Flux<T>): MessageDispatcher

Creates a new message dispatcher for a specific named aggregate.

Link copied to clipboard
abstract fun receiveMessage(namedAggregate: NamedAggregate): Flux<T>

Creates a flux of messages for the specified named aggregate.

Link copied to clipboard
open override fun run()

Starts the dispatcher by running all aggregate dispatchers.