StatelessSagaFunctionRegistrar

class StatelessSagaFunctionRegistrar(commandGateway: CommandGateway, commandMessageFactory: CommandMessageFactory, actual: MessageFunctionRegistrar<MessageFunction<Any, DomainEventExchange<*>, Mono<*>>> = SimpleMessageFunctionRegistrar()) : AbstractEventFunctionRegistrar

Registrar for stateless saga functions that creates StatelessSagaFunction instances from processors annotated with saga metadata.

Parameters

commandGateway

The gateway used to send commands generated by saga functions.

commandMessageFactory

The factory for creating command messages.

actual

The underlying message function registrar (default: SimpleMessageFunctionRegistrar).

Constructors

Link copied to clipboard
constructor(commandGateway: CommandGateway, commandMessageFactory: CommandMessageFactory, actual: MessageFunctionRegistrar<MessageFunction<Any, DomainEventExchange<*>, Mono<*>>> = SimpleMessageFunctionRegistrar())

Functions

Link copied to clipboard
open override fun resolveProcessor(processor: Any): Set<MessageFunction<Any, DomainEventExchange<*>, Mono<*>>>

Resolves the processor by extracting saga metadata and creating stateless saga functions. This method parses the processor's class for saga annotations and wraps the resulting message functions with StatelessSagaFunction to handle command execution.