limitEvents property
Ceiling on un-consumed MESSAGES held for a single stream.
The byte bound cannot see a zero-copy payload: bufferedBytes is 0 for a
directPayload, because queuing one costs a pointer for an object the
process already retains. Measured, that is true of exactly one shape — a
queue of objects the application holds anyway costs -1 MiB — and false of
the other, where minting one per message put 313 MiB of payload behind a
paused consumer with nothing charged for it.
So this counts EVENTS, which is the only quantity that bounds both: an operator cannot meaningfully set a nominal weight for someone else's object, and a queue depth needs nothing invented.
Implementation
final int limitEvents;