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

Schemas aren't cached #28

Closed
torgeirsh opened this issue Jun 7, 2019 · 1 comment
Closed

Schemas aren't cached #28

torgeirsh opened this issue Jun 7, 2019 · 1 comment

Comments

@torgeirsh
Copy link
Contributor

decodeWithSchema calls loadSchema, which looks up the schema in the cache, and if it doesn't find it, calls getSchemaById, which downloads the schema from the registry. However, I can't see that the downloaded schema is stored in the cache. With Wireshark running, I can see that the schema is downloaded every time a Kafka message is decoded, so it takes a long time to process 5000 messages. Is this a bug, or am I using the library the wrong way?

@AlexeyRaga
Copy link
Member

@torgeirsh Wow, you are right! loadSubjectSchema does cache schemas, but not loadSchema.
It is certainly a bug.

AlexeyRaga added a commit that referenced this issue Jul 12, 2019
Cache downloaded schemas to fix #28.
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

2 participants