Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add schema registry infos to Kafka binding #115

Merged
merged 5 commits into from
Sep 28, 2022

Conversation

lbroudoux
Copy link
Collaborator

Description

As of today, there's no way using 0.2.0 version of Kafka bindings to provide information on whether a Schema Registry was/has to be used to provide/gather schema information for messages published on topics.

However, such information is required to help on two use-cases:

  1. Inform API providers to enable schema registry connection and pick the right vendor serdes,
  2. Inform API consumers on the same things but also how to bypass if schema registry is unavailable

Use-cases and needed informations have been discussed with @nictownsend and @dalelane. This PR is aggregating validated propositions. The proposition is to add following attributes:

At the server level:

  • schemaRegistryUrl - API URL for the Schema Registry used when producing Kafka messages
  • schemaRegistryVendor - he vendor of Schema Registry and Kafka serdes library that should be used

At the operation level:

  • schemaIdLocation - Tells where the id of schema is stored (e.g. header or payload)
  • schemaIdPayloadEncoding - Number of bytes or vendor specific values when schema id is encoded in payload
  • schemaLookupStrategy - Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied.

Related issue(s)

This PR is related to #40 and #41. It has been initially discussed into PR #55 but finally close due to inactivity.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@lbroudoux lbroudoux changed the title Add schema registry infos to Kafka binding feat: Add schema registry infos to Kafka binding Feb 4, 2022
@lbroudoux lbroudoux changed the title feat: Add schema registry infos to Kafka binding feat: add schema registry infos to Kafka binding Feb 4, 2022
Copy link
Collaborator

@dalelane dalelane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone using schemas (and a schema registry) could use that to serialize a message key, the message payload, or both.

Is the assumption here that schema-related bindings settings relate to message payload only?

kafka/README.md Outdated Show resolved Hide resolved
kafka/README.md Outdated Show resolved Hide resolved
kafka/README.md Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Jun 7, 2022

This pull request has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Jun 7, 2022
@derberg
Copy link
Member

derberg commented Jun 7, 2022

@lbroudoux do you plan to continue with this one?

@github-actions github-actions bot removed the stale label Jun 8, 2022
kafka/README.md Outdated Show resolved Hide resolved
@lbroudoux
Copy link
Collaborator Author

@lbroudoux do you plan to continue with this one?

Yep. Sorry for the long time no see. Will have more free cycles now 😉

@lbroudoux
Copy link
Collaborator Author

Push a new commit to update to latest spec version.

kafka/README.md Outdated Show resolved Hide resolved
@char0n char0n mentioned this pull request Sep 6, 2022
61 tasks
dalelane
dalelane previously approved these changes Sep 14, 2022
Copy link
Collaborator

@dalelane dalelane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@char0n
Copy link
Collaborator

char0n commented Sep 20, 2022

@KhudaDad414 @dratasich would you mind looking into this PR again? Thanks!

@dratasich
Copy link

Thanks @lbroudoux - I like and appreciate the outcome. From my point of view very useful!

Copy link
Member

@KhudaDad414 KhudaDad414 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! just a small typo.

kafka/json_schemas/channel.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@dalelane dalelane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch on the typo :)

@char0n
Copy link
Collaborator

char0n commented Sep 28, 2022

@derberg this PR is made against master directly. Can we merge this PR?

@lbroudoux lbroudoux merged commit 9fba048 into asyncapi:master Sep 28, 2022
@fmvilas
Copy link
Member

fmvilas commented Sep 28, 2022

👏 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants