InMemoryStateEventBus

class InMemoryStateEventBus(val sinkSupplier: (NamedAggregate) -> Sinks.Many<StateEvent<*>> = { Sinks.unsafe().many().multicast().onBackpressureBuffer<StateEvent<*>>().concurrent() }) : InMemoryMessageBus<StateEvent<*>, StateEventExchange<*>> , LocalStateEventBus

In-memory implementation of LocalStateEventBus for testing and development. Uses Reactor Sinks for message broadcasting within the same JVM instance. Messages are not persisted and are lost when the application restarts.

Parameters

sinkSupplier

Supplier for creating sinks for each named aggregate (default: multicast sink with backpressure buffer).

Constructors

Link copied to clipboard
constructor(sinkSupplier: (NamedAggregate) -> Sinks.Many<StateEvent<*>> = { Sinks.unsafe().many().multicast().onBackpressureBuffer<StateEvent<*>>().concurrent() })

Properties

Link copied to clipboard
open override val sinkSupplier: (NamedAggregate) -> Sinks.Many<StateEvent<*>>

Functions

Link copied to clipboard
open override fun StateEvent<*>.createExchange(): StateEventExchange<*>

Creates a StateEventExchange from a StateEvent message. Wraps the state event in a SimpleStateEventExchange for processing.