...
beginningOffsets
close
commitSync
committed
endOffsets
listTopics
offsetsForTimes
partitionsFor
position
Network I/O Timeouts
In most cases, the timeouts provided by users are mostly used to time-bound network I/O. The communication between the client and brokers is going to constitute the majority of the time for those operations. Allowing the user to provide an upper bound on the total time of When a timeout-based Consumer
API is invoked, that timeout value provides an upper-bound for the aggregation of the entire set of operations required by that API call. That is, the length of time for all the constituent operations of that API call must be less than or equal to the timeout provided by the user. In practice, timeouts are largely used to time-bound network I/O. The communication between the client and brokers is going to constitute the majority of the time for many operations. Allowing the user to provide an upper bound on the total time of these operations provides some protection against network issues..
Retries
In the following diagram, we see that the user has invoked a Consumer API call with a timeout:
draw.io Diagram | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
For API calls that require When an API that performs network I/O is invokedoperations, the Consumer
will arrange to have one or more issue network requests issued to the Kafka cluster. Each of those distinct network requests include their own timeout value. The
and Under the covers, the consumer uses the NetworkClient.send()
API that takes a ClientRequest
. ClientRequest
represents a distinct network request, which includes a timeout value, which will be the smaller of the request.timeout.ms configuration value and the remaining timeout value.
...