Schema-registry: `kafka-avro-console-producer` should allow non-Avro type

Created on 10 Jun 2019  路  1Comment  路  Source: confluentinc/schema-registry

If using kafka-avro-console-producer to produce messages with a key, then the key must be Avro type. It does not allow non-Avro keys. If trying to produce non-Avro keys, a message is thrown from:

https://github.com/confluentinc/schema-registry/blob/master/avro-serializer/src/main/java/io/confluent/kafka/formatter/AvroMessageReader.java#L150

org.apache.kafka.common.config.ConfigException: Must provide the Avro schema string in key.schema
    at io.confluent.kafka.formatter.AvroMessageReader.init(AvroMessageReader.java:150)
    at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:42)
    at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)

Also somewhat related issue to producing Long keys: https://issues.apache.org/jira/browse/KAFKA-2526

Most helpful comment

Link #935

>All comments

Link #935

Was this page helpful?
0 / 5 - 0 ratings