Skip to content
This repository was archived by the owner on Nov 16, 2026. It is now read-only.
This repository was archived by the owner on Nov 16, 2026. It is now read-only.

[FEATURE] Support running KoP with Confluent Schema Registry #241

Closed

Description

@BewareMyPower

Is your feature request related to a problem? Please describe.
Currently Confluent Schema Registry cannot run with KoP because KoP doesn't support CreateTopics and DescribeConfigs requests. Also, it causes that Kafka's AdminClient doesn't work currently.

P.S. since KoP is based on Kafka 2.0.0, the related Confluent Schema Registry version is 5.0.0.

Describe the solution you'd like


The DeleteTopics request is not related to this issue. So we'll do the task later.

Activity

  1. added
    type/feature
    on Nov 25, 2020
  2. BewareMyPower commented on Nov 27, 2020

    @BewareMyPower
    ContributorAuthor

    After #244 , the Confluent Schema Registry still failed because it will simply send a record and consume until the offset:

      public void waitUntilKafkaReaderReachesLastOffset(int timeoutMs) throws StoreException {
        long offsetOfLastMessage = getLatestOffset(timeoutMs);
        log.info("Wait to catch up until the offset of the last message at " + offsetOfLastMessage);
        kafkaTopicReader.waitUntilOffset(offsetOfLastMessage, timeoutMs, TimeUnit.MILLISECONDS);
        log.debug("Reached offset at " + offsetOfLastMessage);
      }
          // in getLatestOffset()
          Future<RecordMetadata> ack = producer.send(producerRecord);
          RecordMetadata metadata = ack.get(timeoutMs, TimeUnit.MILLISECONDS);
          this.lastWrittenOffset = metadata.offset();
          log.trace("Noop record's offset is " + this.lastWrittenOffset);
          return this.lastWrittenOffset;

    However, KoP doesn't return the offset field to producer now. It's simply set -1. So we need to fix it first.

  3. BewareMyPower commented on Dec 7, 2020

    @BewareMyPower
    ContributorAuthor

    Confluent Schema Registry will still fail if _schemas already exist. It's caused by:

          Set<String> allTopics = admin.listTopics().names().get(initTimeout, TimeUnit.MILLISECONDS);
          if (allTopics.contains(topic)) {
            verifySchemaTopic(admin);
          } else {
            createSchemaTopic(admin);
          }

    After #206 ,the topic names returned by admin.listTopics()contain the namespace prefix, so it will call createSchemaTopic(admin) again. So we need to fix it and add a unit test of Kafka AdminClient.

  4. BewareMyPower commented on Dec 7, 2020

    @BewareMyPower
    ContributorAuthor

    After building KoP with a branch that merges #251 and #254 , the KoP runs well with Confluent Schema Registry no matter if the schema topic exists. So this issue can be closed after they're merged. PTAL, @jiazhai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

triage/week-48type/feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions