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

SR: Implement cached schema registry client #1049

Merged
merged 9 commits into from
Jun 16, 2023
Merged

Conversation

lovromazgon
Copy link
Member

@lovromazgon lovromazgon commented May 26, 2023

Description

This PR implements a cached Schema Registry client. The client caches schemas based on their IDs, subject/fingerprint and subject/version. This makes it possible to prevent round trips when registering new schemas (needed in autoRegister encoder strategy), fetching schemas using subject/version (needed in registry encoder strategy) and fetching schemas by their ID (needed in decoder).

Integration tests run against the Confluent schema registry.

NB: The code currently does not compile, it depends on twmb/franz-go#461. Other than updating the dependency, there are no more changes planned. It's merged.

Fixes #1048

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@lovromazgon lovromazgon requested a review from a team as a code owner May 26, 2023 13:31
Copy link
Contributor

@hariso hariso left a comment

Choose a reason for hiding this comment

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

LGTM!

test/docker-compose-schemaregistry.yml Outdated Show resolved Hide resolved
@lovromazgon lovromazgon requested a review from hariso June 14, 2023 12:07
Copy link
Contributor

@hariso hariso left a comment

Choose a reason for hiding this comment

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

💪

@lovromazgon lovromazgon merged commit e634ec8 into main Jun 16, 2023
3 checks passed
@lovromazgon lovromazgon deleted the lovro/sr-client-cache branch June 16, 2023 13:57
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.

SR: Cached Schema Registry Client
2 participants