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())
Functions
Link copied to clipboard
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
open fun runtimeReceiver(subscription: MessageSubscription): MessageReceiver<ServerCommandExchange<*>>
Creates the message source owned by a me.ahoo.wow.runtime.WowRuntime dispatcher.
Link copied to clipboard
Sends a command message, prioritizing local processing. Void commands are automatically configured to not use local-first behavior.