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

SpecificAvroSerde configure can only be called once #1903

Open
slominskir opened this issue Jun 9, 2021 · 0 comments · May be fixed by #1904
Open

SpecificAvroSerde configure can only be called once #1903

slominskir opened this issue Jun 9, 2021 · 0 comments · May be fixed by #1904

Comments

@slominskir
Copy link
Contributor

If you call SpecificAvroSerde configure multiple times the result is that the value used in the first call is used, not the value used in the last call. This is not documented and is surprising.

For example if you have a class that instantiates a SERDE with typical values, but then have a test case that attempts to use the "mock://testing" url for the AbstractKafkaSchemaSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG property the test will not use the mock schema registry as expected.

Work around is to re-organize your code to ensure configure is never called more than once. Requested fix is either to document this behavior or update the code to allow configure to accept changes.

slominskir added a commit to slominskir/schema-registry that referenced this issue Jun 9, 2021
@slominskir slominskir linked a pull request Jun 9, 2021 that will close this issue
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 a pull request may close this issue.

1 participant