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

Unknown telemetry state: TERMINATED thrown when closing AsyncKafkaConsumer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.9.0
    • None
    • clients, metrics
    • None

    Description

      An error is occasionally thrown when closing the AsyncKafkaConsumer:

      [ERROR] 2024-06-20 17:13:54,121 [consumer_background_thread] org.apache.kafka.clients.consumer.internals.ConsumerNetworkThread lambda$configureThread$0 - Uncaught exception in thread 'consumer_background_thread':
      java.lang.IllegalStateException: Unknown telemetry state: TERMINATED
              at org.apache.kafka.common.telemetry.internals.ClientTelemetryReporter$DefaultClientTelemetrySender.timeToNextUpdate(ClientTelemetryReporter.java:363)
              at org.apache.kafka.clients.NetworkClient$TelemetrySender.maybeUpdate(NetworkClient.java:1392)
              at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:668)
              at org.apache.kafka.clients.consumer.internals.NetworkClientDelegate.poll(NetworkClientDelegate.java:143)
              at org.apache.kafka.clients.consumer.internals.ConsumerNetworkThread.sendUnsentRequests(ConsumerNetworkThread.java:299)
              at org.apache.kafka.clients.consumer.internals.ConsumerNetworkThread.cleanup(ConsumerNetworkThread.java:318)
              at org.apache.kafka.clients.consumer.internals.ConsumerNetworkThread.run(ConsumerNetworkThread.java:105)

      The issue appears to be that the TERMINATED state is not expected in the switch statement inside timeToNextUpdate().

      As an aside, the error message might make more sense to be written as "Unexpected telemetry state" instead of "Unknown telemetry state" since TERMINATED is a known state, but heretofore unexpected.

      Attachments

        Activity

          People

            apoorvmittal10 Apoorv Mittal
            kirktrue Kirk True
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: