Package-level declarations

Types

Link copied to clipboard

Abstract base class for aggregate event dispatchers.

Link copied to clipboard
abstract class AbstractEventDispatcher<R : Mono<*>> : MessageDispatcher

Abstract base class for event dispatchers that coordinate domain and state event processing.

Link copied to clipboard

Abstract base class for event function registrars.

Link copied to clipboard
class AggregateEventDispatcher(val namedAggregate: NamedAggregate, val name: String = "-", val parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, val messageFlux: Flux<EventStreamExchange>, val functionRegistrar: MessageFunctionRegistrar<MessageFunction<Any, DomainEventExchange<*>, Mono<*>>>, val eventHandler: EventHandler, val scheduler: Scheduler) : AbstractAggregateEventDispatcher<EventStreamExchange>

Dispatcher for processing domain events within a specific aggregate context.

Link copied to clipboard
class AggregateStateEventDispatcher(val namedAggregate: NamedAggregate, val name: String = "-", val parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, val messageFlux: Flux<StateEventExchange<*>>, val functionRegistrar: MessageFunctionRegistrar<MessageFunction<Any, DomainEventExchange<*>, Mono<*>>>, val eventHandler: EventHandler, val scheduler: Scheduler) : AbstractAggregateEventDispatcher<StateEventExchange<*>>

Dispatcher for processing state events within a specific aggregate context.

Link copied to clipboard

Default implementation of DomainEventHandler.

Link copied to clipboard

Distributed Domain Event Bus interface for cross-process event handling.

Link copied to clipboard

Domain Event Bus interface for publishing and subscribing to domain event streams.

Link copied to clipboard
class DomainEventDispatcher(val name: String, val parallelism: Int = MessageParallelism.DEFAULT_PARALLELISM, val domainEventBus: DomainEventBus, val stateEventBus: StateEventBus, val functionRegistrar: DomainEventFunctionRegistrar, val eventHandler: DomainEventHandler, schedulerSupplier: AggregateSchedulerSupplier = DefaultAggregateSchedulerSupplier("EventDispatcher")) : AbstractEventDispatcher<Mono<*>>

Domain Event Dispatcher responsible for coordinating the processing of domain events.

Link copied to clipboard

Exception wrapper for domain events containing error information.

Link copied to clipboard

Exchange interface for domain event processing.

Link copied to clipboard

Filter for processing domain events through registered event functions.

Link copied to clipboard

Registrar for domain event processing functions.

Link copied to clipboard

Interface for domain event handlers.

Link copied to clipboard

Domain Event Stream interface representing a sequence of domain events.

Link copied to clipboard
Link copied to clipboard

Base interface for event handlers that process domain event exchanges.

Link copied to clipboard

Exchange interface for domain event stream processing.

Link copied to clipboard
class InMemoryDomainEventBus(val sinkSupplier: (NamedAggregate) -> Sinks.Many<DomainEventStream> = { Sinks.many().multicast().onBackpressureBuffer() }) : InMemoryMessageBus<DomainEventStream, EventStreamExchange> , LocalDomainEventBus

In-memory implementation of LocalDomainEventBus.

Link copied to clipboard

Local Domain Event Bus interface for in-process event handling.

Link copied to clipboard

Domain event bus that prioritizes local processing before distributed publishing.

Link copied to clipboard

No-operation implementation of DomainEventBus.

Link copied to clipboard
data class SimpleDomainEvent<T : Any>(val id: String = generateGlobalId(), val header: Header = DefaultHeader.empty(), val body: T, val aggregateId: AggregateId, val ownerId: String = OwnerId.DEFAULT_OWNER_ID, val version: Int, val sequence: Int = DEFAULT_EVENT_SEQUENCE, val revision: String = DEFAULT_REVISION, val commandId: String, val name: String = body.javaClass.toName(), val isLast: Boolean = true, val createTime: Long = System.currentTimeMillis()) : DomainEvent<T> , NamedAggregate

Simple implementation of DomainEvent.

Link copied to clipboard
class SimpleDomainEventExchange<T : Any>(val message: DomainEvent<T>, val attributes: MutableMap<String, Any> = ConcurrentHashMap()) : DomainEventExchange<T>

Simple implementation of DomainEventExchange.

Link copied to clipboard
data class SimpleDomainEventStream(val id: String = generateGlobalId(), val requestId: String, val header: Header = DefaultHeader.empty(), val body: List<DomainEvent<*>>) : DomainEventStream, Iterable<DomainEvent<*>>

Simple implementation of DomainEventStream.

Link copied to clipboard
class SimpleEventStreamExchange(val message: DomainEventStream, val attributes: MutableMap<String, Any> = ConcurrentHashMap()) : EventStreamExchange

Simple implementation of EventStreamExchange.

Link copied to clipboard
class SimpleStateDomainEventExchange<S : Any, T : Any>(val state: ReadOnlyStateAggregate<S>, val message: DomainEvent<T>, val attributes: MutableMap<String, Any> = ConcurrentHashMap()) : StateDomainEventExchange<S, T>

Simple implementation of StateDomainEventExchange.

Link copied to clipboard

Exchange interface for domain events with state context.

Functions

Link copied to clipboard

Flattens an object into an iterable of events.

Link copied to clipboard

Determines if this event stream should be ignored during event sourcing.

Link copied to clipboard
fun <T : Any> T.toDomainEvent(aggregateId: AggregateId, commandId: String, id: String = generateGlobalId(), version: Int = Version.INITIAL_VERSION, ownerId: String = OwnerId.DEFAULT_OWNER_ID, sequence: Int = DEFAULT_EVENT_SEQUENCE, isLast: Boolean = true, header: Header = DefaultHeader.empty(), createTime: Long = System.currentTimeMillis()): DomainEvent<T>

Converts an object to a domain event with full parameter control.

fun <T : Any> T.toDomainEvent(aggregateId: String, tenantId: String, commandId: String, ownerId: String = OwnerId.DEFAULT_OWNER_ID, id: String = generateGlobalId(), version: Int = Version.INITIAL_VERSION, sequence: Int = DEFAULT_EVENT_SEQUENCE, isLast: Boolean = true, header: Header = DefaultHeader.empty(), createTime: Long = System.currentTimeMillis()): DomainEvent<T>

Converts an object to a domain event using string aggregate identifiers.

Link copied to clipboard
fun Any.toDomainEventStream(upstream: CommandMessage<*>, aggregateVersion: Int, stateOwnerId: String = OwnerId.DEFAULT_OWNER_ID, header: Header = DefaultHeader.empty(), createTime: Long = System.currentTimeMillis()): DomainEventStream

Converts an object to a domain event stream based on a command message.