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

Kafka producer - avro schema key+value update wanted #2418

Closed
jmlecul opened this issue Nov 9, 2022 · 2 comments
Closed

Kafka producer - avro schema key+value update wanted #2418

jmlecul opened this issue Nov 9, 2022 · 2 comments

Comments

@jmlecul
Copy link
Contributor

jmlecul commented Nov 9, 2022

Cerberus Version : 4.15-1742

Hi,
With the recent update we can write kafka event with avro schema value (and a key in string),
But we have kafka topic with both avro schema for value and key, example :
image

in this cas the key is also drived with an other avro schema (diffrent from the value one)

but the service screen don't allow this kind of double avro schema :
image

Thanx in advance for this request, no doubt than it will finalize the kafka avro schema integration in cerberus

regards,
jm

@vertigo17
Copy link
Member

Hello @jmlecul my last commit should fix the issue.
An additional field was added to save the schema for the key.
Schema are mandatory when using PRODUCE method. Schema registry will then be activated only if corresponding schema is defined (not empty).
When using SEARCH method, you also have to define a non empty value in order to activate key avro deserialisation. The value does not matter as long as it is not empty.

Unfortunately this is so far not possible for me to test so I really will need your feedback in order to confirm that this code is working fine and introduce no regression.
I was only able to test the KAFKA without use of Avro that still work fine.

@vertigo17
Copy link
Member

Hello again. I finaly managed to test on my side using a confluence docker compose.
I was able to perform quite a few fix and secure to test all produce and search using either key or value (or both) in avro format.
modal has been redesigned also adding 2 checkbox in order to activate avro on either of the 2 fields.
I let you confirm everything is fine on your side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants