DomainEventDispatcher

class DomainEventDispatcher(val name: String, val parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, val domainEventBus: DomainEventBus, val stateEventBus: StateEventBus, val functionRegistrar: DomainEventFunctionRegistrar, val eventHandler: DomainEventHandler, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("EventDispatcher")) : AbstractEventDispatcher<Mono<*>>

Domain Event Dispatcher responsible for coordinating the processing of domain events.

This class extends AbstractEventDispatcher to provide concrete implementation for handling domain events through the event bus system. It manages the lifecycle of event processing, including subscription to event streams and distribution of events to appropriate handlers.

See also

Constructors

Link copied to clipboard
constructor(name: String, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, domainEventBus: DomainEventBus, stateEventBus: StateEventBus, functionRegistrar: DomainEventFunctionRegistrar, eventHandler: DomainEventHandler, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("EventDispatcher"))

Properties

Link copied to clipboard
open override val domainEventBus: DomainEventBus

The domain event bus for publishing and subscribing to domain events.

Link copied to clipboard
open override val eventHandler: DomainEventHandler

The event handler for processing domain events.

Link copied to clipboard

The registrar for domain event handler functions.

Link copied to clipboard
open override val name: String

The name of this dispatcher, typically formatted as applicationName.DomainEventDispatcher.

Link copied to clipboard
open override val parallelism: Int

The level of parallelism for processing events.

Link copied to clipboard
open override val stateEventBus: StateEventBus

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.