LocalFirstCommandBus

class LocalFirstCommandBus(val distributedBus: DistributedCommandBus, val localBus: LocalCommandBus = InMemoryCommandBus()) : CommandBus, LocalFirstMessageBus<CommandMessage<*>, ServerCommandExchange<*>>

Command bus that prioritizes local processing before falling back to distributed processing. Void commands are automatically configured to skip local-first behavior since they don't require waiting for results.

Parameters

distributedBus

The distributed command bus for fallback processing.

localBus

The local command bus for primary processing. Defaults to InMemoryCommandBus.

Constructors

Link copied to clipboard
constructor(distributedBus: DistributedCommandBus, localBus: LocalCommandBus = InMemoryCommandBus())

Properties

Link copied to clipboard
Link copied to clipboard
open override val localBus: LocalCommandBus

Functions

Link copied to clipboard
open override fun send(message: CommandMessage<*>): Mono<Void>

Sends a command message, prioritizing local processing. Void commands are automatically configured to not use local-first behavior.