Control center "produce a new message to this topic" breaks with Avro

Confluent Platform 6.2.0 added a “produce a new message to this topic” form to the messages display. But the key and value have to be specified as JSON and, contrary to my hopes, don’t appear to leverage the REST Proxy to publish the message in Avro if the topic has Avro schemas.

So this new UI is a gotcha for any Avro-schema-using topic. If the user publishes a message via this form, their topic will now have a non-Avro message published to it. The UI reports the message as successfully published, but the topic is from that point in a broken state (previous messages in Avro, message via the new UI is JSON) and if you now try to use Control Center messages “jump to offset” to view messages from the beginning they’ll halt right before the JSON message due to the type mismatch.

Consider either enhancing the new UI so that it leverages the REST Proxy (or equivalent) to convert JSON to Avro in cases where the topic uses Avro schemas. Or else disabling/hiding the form if the topic has schemas which aren’t supported. Or at a minimum add a warning to that effect.

2 Likes

Hey great, that someone else found this issue too.

A feature request would be, on producing a message via the UI to check, which schema type is connected to the topic. If it’s avro the avro-serialiser must be called to build the binary avro message from the input. The input has to be accodring to the avro schema to be converted correctly.

Perhaps a UI developer feels the pain in producing wrong (json) messages via the UI where avro is required.

Regards,
Bernd

1 Like

It would be really nice if when you go to produce a message that the Control Center could read the available Avro schemas (it should be able to) and select the schema version they want to produce a message for as the template. This would make it very easy to submit simple messages for local development.

Agree. Kafka-UI offers this functionality. Would be great if Control Center / Confluent Cloud Console did too.