tchiotludo / akhq

Kafka GUI for Apache Kafka to manage topics, topics data, consumers group, schema registry, connect and more...
https://akhq.io/
Apache License 2.0
3.38k stars 656 forks source link

Support Apicurio as schema registry #1046

Open aboucham opened 2 years ago

aboucham commented 2 years ago

That would be great if we have the support of Apicurio Registry as schema registry: https://www.apicur.io/registry/

sookeke commented 1 year ago

@tchiotludo @aboucham You can use Apicurio Schema Registry in Confluent Schema Registry API compatibility mode

Confluent Schema Registry API (Version 6) To provide compatibility with Confluent Serdes (and other clients), Apicurio Registry implements the API defined by the Confluent Schema Registry. Use this endpoint if your tooling is compatible with v6 of that API. This is only provided for compatibility purposes, the core Registry API should be used instead when possible. /apis/ccompat/v6

  schema-registry:
    url: " https://server-name/apis/ccompat/v6" # schema registry url (optional)
    type: "confluent" # schema registry type (optional). Supported types are "confluent" (default) or "tibco"
    # Basic Auth user / pass
    basic-auth-username: registry-client
    basic-auth-password: registry-client-secret

This works for me for now for this purpose but note the core Registry API should be used instead when possible.

tchiotludo commented 1 year ago

@sookeke, waiting a PR on that one, maybe you can add PR on the docs here (a page to create) ?

sookeke commented 1 year ago

@tchiotludo sure, I will add a pr and document this next week. Thanks

j2gg0s commented 1 year ago

We configured the same as the previous example, but encountered the error. No artifact with ID 'gid-0' in group 'null' was found.; error code: 40401

The message is writen by debezium with apicuri as converter, link: https://debezium.io/documentation/reference/2.3/configuration/avro.html#overview-of-deploying-a-debezium-connector-that-uses-avro-serialization

The first byte of message key/value is magic byte, [1, 9) is id of schema.

Brico87 commented 3 months ago

Hello ! I really like AKHQ and I would like to continue using it. Combining it with Apicurio is a massive enabler for our project ! However, the compatibility with the Confluent API is a bit incomplete ... Or maybe I am lacking some information :)

From https://github.com/Apicurio/apicurio-registry/issues/4403, I understand that the group ID must be injected through header X-Registry-GroupId, otherwise /apis/ccompat/v7/subjects will return empty results (if you use group ID). Shall I use the reverse proxy configuration for that ? Cheers !

carlesarnal commented 3 months ago

Hello ! I really like AKHQ and I would like to continue using it. Combining it with Apicurio is a massive enabler for our project ! However, the compatibility with the Confluent API is a bit incomplete ... Or maybe I am lacking some information :)

From Apicurio/apicurio-registry#4403, I understand that the group ID must be injected through header X-Registry-GroupId, otherwise /apis/ccompat/v7/subjects will return empty results (if you use group ID). Shall I use the reverse proxy configuration for that ? Cheers !

Hello @Brico87!

Carles here from the Apicurio team. I'm one of the maintainers of the ccompat API. If you're using groups in your deployment then yes, the group must be passed otherwise you'll get empty results, as you said. However, if you're not interested in groups, you can just do nothing and all the operations will be executed using the default one, and everything should work as expected. If you encounter any problems, feel free to open an issue and we will take a look!

Brico87 commented 3 months ago

Hi @carlesarnal , the issue is not on the Apicurio side IMHO. It could be good to have a parameter to specify the group ID we would like to look for.

zapho commented 3 months ago

Having apicurio support would be a great addition. We're using group ID and using ccompat apis does not work.

carlesarnal commented 2 months ago

Commenting here again, sorry for the delay, I've been on PTO. As it turns out, the proper solution to this is to add a new Schema Registry source to AKHQ, as it would support all the details that are naturally intrinsic to Apicurio Registry, and it wouldn't matter if you're using our APIs in a compatibility mode or not, all your information will be usable. That said, I cannot comment on when we can implement such support, given other priorities. In any case, feel free to assign this to me in some fashion :)