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

Support for multiple consumer schemas within a topic #82

Open
untitaker opened this issue Mar 31, 2023 · 0 comments
Open

Support for multiple consumer schemas within a topic #82

untitaker opened this issue Mar 31, 2023 · 0 comments

Comments

@untitaker
Copy link
Member

untitaker commented Mar 31, 2023

Currently, each topic has exactly one latest version which can only have one schema.

We already run into limitations with this design as per #80, because we want to have some sort of type definition for some usecase unrelated to the needs of the consumer that the schema was designed for. As a result we end up adding restrictions to the schema that go far beyond the consumer's own needs.

This might become a problem because in a world where validation errors become more than warnings, it makes the consumer more brittle and reject/DLQ messages that it would've been able to process fine.

Proposal is to add a concept of consumer groups to sentry-kafka-schemas, and then each consumer group is individually versioned (instead of the topic). As a result we can have an arbitrary amount of "latest" schemas for a topic, and even run validation for all of them in the snuba consumer, but only one schema's validation errors cause DLQ/rejection of messages. The rest can be warnings.

For documentation purposes, a combined view of all schemas can be rendered, or all schemas can even be combined into one using allOf if that is somehow useful.

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

No branches or pull requests

1 participant