Replies: 1 comment 1 reply
-
@chiang8 By default, SchemaRegistrySerde uses the first 4 bytes to determine the schema version during deserialization. The TopicNameStrategy is applied only when serializing. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am having trouble browsing the topic messages via kafka-ui.

A bit of the background first. I am running Kafka cluster, schema registry and kafka-ui in a local Docker container. Messages, which are serialized in Avro format, are sent to a topic successfully with a Kafka client. I was trying to browse the messages and the message values are in a scrambled format.
I checked the backend log and it's having trouble getting the right schema from schema registry as it's using a wrong subject(ie. ${topic}-value). Since this topic contains messages with different schemas, the right SubjectNameStrategy should have been
io.confluent.kafka.serializers.subject.RecordNameStrategy
.I dig a little bit deeper. I can see SchemaRegistrySerde picks the right MessageFormatter(ie.
AvroMessageFormatter
) to deserialize the message but the internal KafkaAvroDeserializer is configured to useio.confluent.kafka.serializers.subject.TopicNameStrategy
. As a result of the lookup failure, kafka-ui falls back to the StringSerde, which explains the scrambled message.I am wondering if there is a way to override this behaviour. Thx.
Beta Was this translation helpful? Give feedback.
All reactions