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

libserdes not registering schema to schema registry when the schema is used for multiple topics #10

Open
nao921 opened this issue Jun 25, 2018 · 2 comments

Comments

@nao921
Copy link

nao921 commented Jun 25, 2018

Looking to use the same schema as key for 2 Kafka topics, topicA and topicB. I'm using libserdes C++ client library to produce the records with Schema Registry setup.

When I produce for topicA for the first time, I observe that 2 new subjects are registered on Schema Registry as being topicA-key and topicB-value.

Using the same schema as key, after publishing an event onto topicB, topicB-key subject is nowhere to be found on Schema Registry, only topicB-value subject.

After some debug log printing, I see that libserdes checks in its local cache on the MD5 of a schema. If it is found in local cache, it will return the schema immediately and not register it with Schema Registry.

@passiondjc
Copy link

Hi,Could you please help me with this issue? i use below command to run example
./serdes-kafka-avro-client -P -b 10.202.8.11:40301 -t testschema -p 1 -r http://localhost:8081 -s testvertica -S '{"type":"record","name""testvertica","namespace":"test","fields":[{"name":"f1","type":"string"},{"name":"f2","type":"string"}]}'

enter:str: {"f1":"value2", "f2":"value3"}

./serdes-kafka-avro-client -C -b 10.202.8.11:40301 -t testschema -p 1 -r http://localhost:8081
show error message:
Failed to read avro value: Cannot read string value: Cannot read string length: Cannot read 1 bytes from memory bufferCannot read string value: Cannot read string length: Cannot read 1 bytes from memory buffer

@lukejackson
Copy link

Essentially the issue is that libserdes does not support the TopicNameStrategy, which is the default naming strategy in the Java Schema Registry client code. It only supports the RecordNameStrategy

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

3 participants