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

"IllegalArgumentException: Invalid negative sequence number used" in Kafka Client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.0, 2.0.1, 2.1.0
    • 1.1.2, 2.2.0, 2.1.1, 2.0.2
    • clients

    Description

      When operating Kafka, we have seen Kafka client logging this kind of exception:

      org.apache.kafka.clients.producer.internals.Sender                  -                              [Producer clientId=interaction-counter-service-2-dev-by-tweet-id-counting-dest-producer, transactionalId=interaction-counter-service-2-dev-by-tweet-id-counting-81-transactional-id-gen-1] Uncaught error in kafka producer I/O thread:
      
      java.lang.IllegalArgumentException: Invalid negative sequence number used
      
          at org.apache.kafka.common.record.MemoryRecordsBuilder.validateProducerState(MemoryRecordsBuilder.java:331)
      
          at org.apache.kafka.common.record.MemoryRecordsBuilder.close(MemoryRecordsBuilder.java:302)
      
          at org.apache.kafka.clients.producer.internals.ProducerBatch.close(ProducerBatch.java:407)
      
          at org.apache.kafka.clients.producer.internals.RecordAccumulator.drain(RecordAccumulator.java:572)
      
          at org.apache.kafka.clients.producer.internals.Sender.sendProducerData(Sender.java:270)
      
          at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:238)
      
          at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:163)
      
          at java.lang.Thread.run(Thread.java:748)
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mingaliu Ming Liu
              Jason Gustafson Jason Gustafson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: