kafka.message.InvalidMessageException: Compacted topic cannot accept message without key.

kafka-users | Dave Peterson | 1 year ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Re: trouble upgrading from 0.8.2.1 to 0.9.0.0: invalid message

    kafka-users | 1 year ago | Dave Peterson
    kafka.message.InvalidMessageException: Compacted topic cannot accept message without key.
  2. 0

    Re: trouble upgrading from 0.8.2.1 to 0.9.0.0: invalid message

    kafka-users | 1 year ago | Joel Koshy
    kafka.message.InvalidMessageException: Compacted topic cannot accept message without key.

    Root Cause Analysis

    1. kafka.message.InvalidMessageException

      Compacted topic cannot accept message without key.

      at kafka.message.ByteBufferMessageSet.validateMessagesAndAssignOffsets()
    2. Apache Kafka
      ReplicaManager$$anonfun$appendToLocalLog$2.apply
      1. kafka.message.ByteBufferMessageSet.validateMessagesAndAssignOffsets(ByteBufferMessageSet.scala:250)
      2. kafka.log.Log.liftedTree1$1(Log.scala:327)
      3. kafka.log.Log.append(Log.scala:326)
      4. kafka.cluster.Partition$$anonfun$9.apply(Partition.scala:442)
      5. kafka.cluster.Partition$$anonfun$9.apply(Partition.scala:428)
      6. kafka.utils.CoreUtils$.inLock(CoreUtils.scala:262)
      7. kafka.utils.CoreUtils$.inReadLock(CoreUtils.scala:268)
      8. kafka.cluster.Partition.appendMessagesToLeader(Partition.scala:428)
      9. kafka.server.ReplicaManager$$anonfun$appendToLocalLog$2.apply(ReplicaManager.scala:401)
      10. kafka.server.ReplicaManager$$anonfun$appendToLocalLog$2.apply(ReplicaManager.scala:386)
      10 frames
    3. Scala
      AbstractTraversable.map
      1. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      2. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      3. scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
      4. scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
      5. scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:226)
      6. scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39)
      7. scala.collection.mutable.HashMap.foreach(HashMap.scala:98)
      8. scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
      9. scala.collection.AbstractTraversable.map(Traversable.scala:105)
      9 frames
    4. Apache Kafka
      KafkaRequestHandler.run
      1. kafka.server.ReplicaManager.appendToLocalLog(ReplicaManager.scala:386)
      2. kafka.server.ReplicaManager.appendMessages(ReplicaManager.scala:322)
      3. kafka.server.KafkaApis.handleProducerRequest(KafkaApis.scala:366)
      4. kafka.server.KafkaApis.handle(KafkaApis.scala:68)
      5. kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:60)
      5 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame