InMemoryCommandBus
class InMemoryCommandBus(val sinkSupplier: (NamedAggregate) -> Sinks.Many<CommandMessage<*>> = {
mpscUnicastManySink()
}) : InMemoryMessageBus<CommandMessage<*>, ServerCommandExchange<*>> , LocalCommandBus
In-memory implementation of CommandBus for local command processing. This bus uses unicast sinks to ensure each command has exactly one consumer, making it suitable for single-instance or testing scenarios.
Author
ahoo wang
Parameters
sinkSupplier
Function that creates a unicast sink for each named aggregate. Defaults to an atomic MPSC unicast sink with backpressure buffer.
Constructors
Link copied to clipboard
constructor(sinkSupplier: (NamedAggregate) -> Sinks.Many<CommandMessage<*>> = {
mpscUnicastManySink()
})