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
Link copied to clipboard
open override val topicKind: TopicKind

The topic kind for command messages.

Functions

Link copied to clipboard
open override fun close()

Closes the message bus and releases any resources. Default implementation does nothing.

Link copied to clipboard
open fun receive(subscription: MessageSubscription): Flux<ServerCommandExchange<*>>

Receives messages for the specified subscription.

Link copied to clipboard

Creates a single message source with an explicit transport readiness boundary.

Link copied to clipboard

Creates the message source owned by a me.ahoo.wow.runtime.WowRuntime dispatcher.

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.