StatelessSagaDispatcher

class StatelessSagaDispatcher(val name: String, val parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, val domainEventBus: DomainEventBus, val stateEventBus: StateEventBus, val functionRegistrar: StatelessSagaFunctionRegistrar, val eventHandler: StatelessSagaHandler, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("SagaDispatcher")) : AbstractEventDispatcher<Mono<*>>

Dispatcher for stateless sagas that handles domain events and coordinates command execution. This dispatcher extends AbstractEventDispatcher to provide event-driven processing for sagas that don't maintain state between events.

Constructors

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

Properties

Link copied to clipboard
open override val domainEventBus: DomainEventBus

The bus for publishing domain events.

Link copied to clipboard

The handler for processing domain events.

Link copied to clipboard

The registrar for stateless saga functions.

Link copied to clipboard
open override val name: String

named like applicationName.StatelessSagaDispatcher

Link copied to clipboard
open override val parallelism: Int

The number of parallel threads for processing messages (default: MessageParallelism.DEFAULT_PARALLELISM).

Link copied to clipboard
open override val stateEventBus: StateEventBus

The bus for publishing state 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.