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

Kafka client throws IndexOutOfBoundsException when polling messages

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: clients
    • Labels:
      None

      Description

      When polling records from Kafka cluster with three brokers, Kafka client throws an IndexOutOfBoundsException:

      java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.apache.kafka.common.metrics.stats.SampledStat.current(SampledStat.java:81) at org.apache.kafka.common.metrics.stats.SampledStat.record(SampledStat.java:48) at org.apache.kafka.common.metrics.stats.Rate.record(Rate.java:61) at org.apache.kafka.common.metrics.stats.Meter.record(Meter.java:79) at org.apache.kafka.common.metrics.Sensor.record(Sensor.java:182) at org.apache.kafka.common.metrics.Sensor.record(Sensor.java:172) at org.apache.kafka.common.metrics.Sensor.record(Sensor.java:159) at org.apache.kafka.common.metrics.Sensor.record(Sensor.java:141) at org.apache.kafka.common.network.Selector.doClose(Selector.java:758) at org.apache.kafka.common.network.Selector.close(Selector.java:739) at org.apache.kafka.common.network.Selector.maybeCloseOldestConnection(Selector.java:647) at org.apache.kafka.common.network.Selector.poll(Selector.java:440) at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:510) at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:271) at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:242) at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:218) at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorReady(AbstractCoordinator.java:230) at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:314) at org.apache.kafka.clients.consumer.KafkaConsumer.updateAssignmentMetadataIfNeeded(KafkaConsumer.java:1218) at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1181) at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1115)

      Code:

       

      ConsumerRecords<String, String> records = consumer.poll(pollTimeOut);
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              i.mekni Ismail Mekni
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: