LocalFirstDomainEventBus
class LocalFirstDomainEventBus(val distributedBus: DistributedDomainEventBus, val localBus: LocalDomainEventBus = InMemoryDomainEventBus()) : DomainEventBus, LocalFirstMessageBus<DomainEventStream, EventStreamExchange>
Domain event bus that prioritizes local processing before distributed publishing.
This implementation extends LocalFirstMessageBus to provide a hybrid event bus that first processes events locally (for immediate consistency) and then publishes them to a distributed bus (for cross-service communication).
Parameters
distributedBus
The distributed event bus
localBus
The local event bus (default: InMemoryDomainEventBus)
See also
Constructors
Link copied to clipboard
constructor(distributedBus: DistributedDomainEventBus, localBus: LocalDomainEventBus = InMemoryDomainEventBus())
Creates a new LocalFirstDomainEventBus with the specified buses