[
https://issues.apache.org/jira/browse/KAFKA-2335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14628373#comment-14628373
]
ASF GitHub Bot commented on KAFKA-2335:
---------------------------------------
GitHub user hachikuji opened a pull request:
https://github.com/apache/kafka/pull/78
KAFKA-2335; fix comment about thread safety
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hachikuji/kafka KAFKA-2335
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/78.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #78
----
commit ee63ed5b5537d31566a08bd2772db83c2fdc9d11
Author: Jason Gustafson <[email protected]>
Date: 2015-07-15T17:10:01Z
KAFKA-2335; fix comment about thread safety
----
> Javadoc for Consumer says that it's thread-safe
> -----------------------------------------------
>
> Key: KAFKA-2335
> URL: https://issues.apache.org/jira/browse/KAFKA-2335
> Project: Kafka
> Issue Type: Bug
> Reporter: Ismael Juma
> Assignee: Jason Gustafson
>
> This looks like it was left there by mistake:
> {quote}
> * The consumer is thread safe but generally will be used only from within a
> single thread. The consumer client has no threads of it's own, all work is
> done in the caller's thread when calls are made on the various methods
> exposed.
> {quote}
> A few paragraphs below it says:
> {quote}
> 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 is properly synchronized. Un-synchronized
> access will result in {@link ConcurrentModificationException}.
> {quote}
> This matches what the code does, so the former quoted section should probably
> be deleted.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)