Skip to content

Support RecordNameStrategy #1432

@Haarolean

Description

@Haarolean

This is the request captured from the schema registry log. It does extract the schema id from the message. Unfortunately subject name(ie. xxx-value) is also part of the query. It would have worked if subject name is omitted.

[2025-09-29 03:41:41,354] INFO 172.253.63.141 - - [29/Sep/2025:03:41:41 +0000] "GET /contexts/.dev/schemas/ids/6?fetchMaxId=false&subject=xxx-value HTTP/1.1" 404 6512 "-" "Java/21.0.6" 14 (io.confluent.rest-utils.requests)

Please correct me if I am wrong. I guess it comes down to the underlying deserializer on how to deserialize the message.

    @Override
    public String format(String topic, byte[] value) {
      Object deserialized = avroDeserializer.deserialize(topic, value);
      var schema = AvroSchemaUtils.getSchema(deserialized);
      return JsonAvroConversion.convertAvroToJson(deserialized, schema).toString();
    }

ref: https://github.com/kafbat/kafka-ui/blob/v1.3.0/api/src/main/java/io/kafbat/ui/serdes/builtin/sr/MessageFormatter.java#L46-L50

'KafkaAvroDeserializer' will include both the subject and schema id upon looking up for the schema from schema registry. It would have omitted the subject name from the query if subject is null though. With TopicNameStrategy in place, it returns ${topic}-value. With RecordNameStrategy instead, it would have returned null.

Originally posted by @chiang8 in #1386 (reply in thread)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions