Skip to content

feat: add schema registry infos to Kafka binding - #115

Merged
lbroudoux merged 5 commits into
asyncapi:masterfrom
lbroudoux:master
Sep 28, 2022
Merged

lbroudoux merged 5 commits into
asyncapi:masterfrom
lbroudoux:master

Conversation

@lbroudoux

Copy link
Copy Markdown
Member

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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

@dalelane dalelane left a comment

Copy link
Copy Markdown
Collaborator

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?

Comment thread kafka/README.md Resolved
Comment thread kafka/README.md Resolved
Comment thread kafka/README.md Resolved
@github-actions

github-actions Bot commented Jun 7, 2022

Copy link
Copy Markdown

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

derberg commented Jun 7, 2022

Copy link
Copy Markdown
Member

@lbroudoux do you plan to continue with this one?

@github-actions github-actions Bot removed the stale label Jun 8, 2022
Comment thread kafka/README.md Resolved
@lbroudoux

Copy link
Copy Markdown
Member 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
Copy Markdown
Member Author

Push a new commit to update to latest spec version.

Comment thread kafka/README.md Resolved
@lbroudoux
lbroudoux requested a review from dalelane August 30, 2022 09:02
@char0n char0n mentioned this pull request Sep 6, 2022
52 of 61 tasks
dalelane
dalelane previously approved these changes Sep 14, 2022

@dalelane dalelane left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@char0n

char0n commented Sep 20, 2022

Copy link
Copy Markdown
Member

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

@dratasich

Copy link
Copy Markdown

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

@KhudaDad414 KhudaDad414 left a comment

Copy link
Copy Markdown
Member

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.

Comment thread kafka/json_schemas/channel.json Resolved

@dalelane dalelane left a comment

Copy link
Copy Markdown
Collaborator

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

char0n commented Sep 28, 2022

Copy link
Copy Markdown
Member

@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

fmvilas commented Sep 28, 2022

Copy link
Copy Markdown
Contributor

👏 🎉

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