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

Define and validate correctness of Consumer.close() and its timeout when thread is interrupted

    XMLWordPrintableJSON

Details

    Description

      The repercussions of a thread's interrupt status on Consumer.close() and its timeout is not well defined. It appears that the ClassicKafkaConsumer will continue to attempt to close all its resources even if an interrupt was triggered prior to—or during—the call to close() though it effectively ignores the user's supplied timeout since each call to NetworkClient.poll() will throw an InterruptException after first making an attempt to poll the socket.

      The task here is to review the existing code, verify the behavior with some unit/integration tests, and document it. Furthermore, once the intended behavior has been confirmed, the AsyncKafkaConsumer should be updated to behave likewise.

      Attachments

        Issue Links

          Activity

            People

              kirktrue Kirk True
              kirktrue Kirk True
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: