mirror of https://github.com/apache/kafka.git
KAFKA-2335; fix comment about consumer thread safety
This commit is contained in:
parent
bdbb9672f5
commit
c697998ef3
|
@ -66,8 +66,7 @@ import static org.apache.kafka.common.utils.Utils.min;
|
||||||
* The consumer maintains TCP connections to the necessary brokers to fetch data for the topics it subscribes to.
|
* The consumer maintains TCP connections to the necessary brokers to fetch data for the topics it subscribes to.
|
||||||
* Failure to close the consumer after use will leak these connections.
|
* Failure to close the consumer after use will leak these connections.
|
||||||
* <p>
|
* <p>
|
||||||
* The consumer is thread safe but generally will be used only from within a single thread. The consumer client has no
|
* The consumer is not thread-safe. See <a href="#multithreaded">Multi-threaded Processing</a> for more details.
|
||||||
* threads of it's own, all work is done in the caller's thread when calls are made on the various methods exposed.
|
|
||||||
*
|
*
|
||||||
* <h3>Offsets and Consumer Position</h3>
|
* <h3>Offsets and Consumer Position</h3>
|
||||||
* Kafka maintains a numerical offset for each record in a partition. This offset acts as a kind of unique identifier of
|
* Kafka maintains a numerical offset for each record in a partition. This offset acts as a kind of unique identifier of
|
||||||
|
@ -302,7 +301,8 @@ import static org.apache.kafka.common.utils.Utils.min;
|
||||||
* methods for seeking to the earliest and latest offset the server maintains are also available (
|
* methods for seeking to the earliest and latest offset the server maintains are also available (
|
||||||
* {@link #seekToBeginning(TopicPartition...)} and {@link #seekToEnd(TopicPartition...)} respectively).
|
* {@link #seekToBeginning(TopicPartition...)} and {@link #seekToEnd(TopicPartition...)} respectively).
|
||||||
*
|
*
|
||||||
* <h3>Multithreaded Processing</h3>
|
*
|
||||||
|
* <h3><a name="multithreaded">Multi-threaded Processing</a></h3>
|
||||||
*
|
*
|
||||||
* The Kafka consumer is NOT thread-safe. All network I/O happens in the thread of the application
|
* The Kafka consumer is NOT thread-safe. All network I/O happens in the thread of the application
|
||||||
* making the call. It is the responsibility of the user to ensure that multi-threaded access
|
* making the call. It is the responsibility of the user to ensure that multi-threaded access
|
||||||
|
|
Loading…
Reference in New Issue