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

Improve error message when trying to produce message without key for compacted topic

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.1.0
    • 2.1.0
    • producer
    • None

    Description

      Goal:

      Return a specific error message like e.g. "Message without a key is not valid for a compacted topic" when trying to produce such a message instead of a CorruptRecordException.

       

      > Yesterday we had the following exception:

      > Exception thrown when sending a message with key='null' and payload='...'
      > to topic sometopic:: org.apache.kafka.common.errors.CorruptRecordException:
      > This message has failed its CRC checksum, exceeds the valid size, or is
      > otherwise corrupt.

      > The cause was identified with the help of
      https://stackoverflow.com/questions/49098274/kafka-stream-get-corruptrecordexception

      > Is it possible / would it makes sense to open an issue to improve the error
      > message for this case?
      > A simple "Message without a key is not valid for a compacted topic" would
      > suffice and point a user  in the right direction.

      Attachments

        Issue Links

          Activity

            People

              omkreddy Manikumar
              pkleindl Patrik Kleindl
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: