When requesting new messages with the simple consumer API and message is
available, by default, the call to messages will return immediatly. If
called in a loop to wait for new messages, a user will have to sleep
between each call to avoid a tight loop, increasing the latency. The
Java API exposes the ability to wait for a minimum of bytes and a
maximum of time before returning no record. We expose those knobs in
fetch-request and messages.
When requesting new messages with the simple consumer API and message is available, by default, the call to
messages
will return immediatly. If called in a loop to wait for new messages, a user will have to sleep between each call to avoid a tight loop, increasing the latency. The Java API exposes the ability to wait for a minimum of bytes and a maximum of time before returning no record. We expose those knobs infetch-request
andmessages
.