DomainEventDispatcher

class DomainEventDispatcher(name: String, parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, domainEventBus: DomainEventBus, stateEventBus: StateEventBus, functionRegistrar: DomainEventFunctionRegistrar, eventHandler: DomainEventHandler, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("EventDispatcher")) : CompositeEventDispatcher

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 name: String

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

Functions

Link copied to clipboard
open override fun close()

Closes this resource by performing a graceful shutdown.

Link copied to clipboard
open override fun start()

Starts the composite event dispatcher by initializing and starting both the event stream dispatcher and state event dispatcher.

Link copied to clipboard
open fun stop()

Synchronously closes this resource with graceful shutdown.

open fun stop(timeout: Duration)

Synchronously closes this resource with graceful shutdown within a specified timeout.

Link copied to clipboard
open override fun stopGracefully(): Mono<Void>

Stops the composite event dispatcher gracefully by stopping both the event stream dispatcher and state event dispatcher.