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