MessageBufferConfig

constructor(channelTypes: Set<String> = emptySet(), capacity: Int = Int.MAX_VALUE, overflow: MessageBufferOverflow = MessageBufferOverflow.DROP_OLDEST)

Parameters

channelTypes

The set of channel types whose NewMessageEvents should be routed through the bounded buffer. Channel types not in this set continue to use the unbuffered path. When this set is empty (the default), buffering is disabled entirely and the per-event channel-type check is skipped.

capacity

The maximum number of NewMessageEvents that can be queued in the buffer while the consumer is busy. Once exceeded, overflow decides which event to drop. Defaults to Int.MAX_VALUE, which effectively disables overflow.

overflow

The strategy applied when the buffer is full: