MessageBus

interface MessageBus<M : Message<*, *>, E : MessageExchange<*, M>> : AutoCloseable

Represents a message bus for sending and receiving messages in a distributed system.

This interface provides the core functionality for message-based communication between different components of the system. Implementations can be local or distributed.

Type Parameters

M

The type of message being handled, must extend Message

E

The type of message exchange, must extend MessageExchange

Inheritors

Functions

Link copied to clipboard
open override fun close()

Closes the message bus and releases any resources. Default implementation does nothing.

Link copied to clipboard
abstract fun receiver(subscription: MessageSubscription): MessageReceiver<E>

The one receive entry: a single message source for subscription, with an explicit transport readiness boundary and processing admission (see MessageReceiver).

Link copied to clipboard
abstract fun send(message: M): Mono<Void>

Sends a message through the message bus.