InMemoryDomainEventBus

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

In-memory implementation of LocalDomainEventBus.

This class provides an in-memory message bus for domain events, suitable for testing or single-process applications. It uses reactive sinks to handle event publishing and subscription within the same JVM instance.

See also

Constructors

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

Creates a new InMemoryDomainEventBus with the specified sink supplier

Properties

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

Function to create reactive sinks for each named aggregate (default: multicast sink with buffer)

Functions

Link copied to clipboard

Creates an EventStreamExchange from a DomainEventStream.