Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2335

Javadoc for Consumer says that it's thread-safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.9.0.0
    • consumer
    • None

    Description

      This looks like it was left there by mistake:

      • 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.

      A few paragraphs below it says:

      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

      Unknown macro: {@link ConcurrentModificationException}

      .

      This matches what the code does, so the former quoted section should probably be deleted.

      Attachments

        Activity

          People

            hachikuji Jason Gustafson
            ijuma Ismael Juma
            Guozhang Wang Guozhang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: