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

Make ConsumerIterator thread-safe for multiple threads in different Kafka groups

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Auto Closed
    • 0.8.2.1
    • None
    • consumer
    • None

    Description

      The API for obtaining a ConsumerIterator requires a group parameter, implying that ConsumerIterators are thread-safe, as long as each thread is in a different Kafka group. However, in practice, attempting to call hasNext() on ConsumerIterators for a thread in one group, and for a thread in another group, results in an InvalidStateException.

      In the future, can we please make ConsumerIterator thread-safe, for a common use case of one consumer thread per group?

      Attachments

        Activity

          People

            nehanarkhede Neha Narkhede
            mcandre Andrew Pennebaker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: