Package-level declarations

Types

Link copied to clipboard

Distributed state event bus that handles message routing across multiple instances or services. Messages are published to a distributed messaging system for cross-instance communication.

Link copied to clipboard
class InMemoryStateEventBus(val sinkSupplier: (NamedAggregate) -> Sinks.Many<StateEvent<*>> = { Sinks.many().multicast().onBackpressureBuffer() }) : 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.

Link copied to clipboard
class LocalFirstStateEventBus(val distributedBus: DistributedStateEventBus, val localBus: LocalStateEventBus = InMemoryStateEventBus()) : StateEventBus, LocalFirstMessageBus<StateEvent<*>, StateEventExchange<*>>

State event bus that prioritizes local message delivery before distributed delivery. Messages are first sent to local subscribers within the same JVM instance, then forwarded to the distributed bus for cross-instance communication. This ensures low-latency local processing while maintaining consistency across instances.

Link copied to clipboard

Local state event bus that handles message routing within the same JVM instance. Messages are processed synchronously without network communication.

Link copied to clipboard

Filter that sends state events to the state event bus after command processing. This filter runs after domain events are sent, ensuring that subscribers receive both the domain event and the updated aggregate state.

Link copied to clipboard
class SimpleStateEventExchange<S : Any>(val message: StateEvent<S>, val attributes: MutableMap<String, Any> = ConcurrentHashMap()) : StateEventExchange<S>

Simple implementation of StateEventExchange using a concurrent hash map for attributes. Provides thread-safe attribute storage for message processing.

Link copied to clipboard

Represents a state event that combines domain event stream data with aggregate state. State events are used in event sourcing to capture both the event and the resulting state.

Link copied to clipboard

Message bus for publishing and subscribing to state events. State events combine domain events with the resulting aggregate state, enabling subscribers to react to both the event and the current state.

Link copied to clipboard
data class StateEventData<S : Any>(val delegate: DomainEventStream, val state: S, val firstOperator: String = delegate.header.operator.orEmpty(), val firstEventTime: Long = delegate.createTime, val deleted: Boolean = false) : StateEvent<S> , Decorator<DomainEventStream> , DomainEventStream

Data class implementation of StateEvent that wraps a DomainEventStream with state information.

Link copied to clipboard

Exchange container for state events during message processing. Provides access to the state event message and allows attaching processing attributes.