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

Question about key #2

Open
ilyasahmed24 opened this issue Dec 13, 2019 · 4 comments
Open

Question about key #2

ilyasahmed24 opened this issue Dec 13, 2019 · 4 comments

Comments

@ilyasahmed24
Copy link

ilyasahmed24 commented Dec 13, 2019

Hi I had q question regarding publishing of key.
I see in the code that
delegateValueSerializer.configure(additionalConfiguration, false);
delegateValueDeserializer.configure(additionalConfiguration, false);
only the value serde is there no key serde.
I have a requirement where i have to publish the key and value both in avro format.
For now when i publish messages only value is sent.
How can this be done?

@commandini
Copy link
Collaborator

commandini commented Dec 18, 2019

@ilyasahmed24 AvroSchemaRegistrySerde class can be refactored to support key serde with schema. However, that would also require to extend the schema registry configuration page in order to allow uploading of schemas for keys, i.e. to have key and value both in Avro format, 2 schemas should be provided. This is not possible with the current component.

@ilyasahmed24
Copy link
Author

ilyasahmed24 commented Dec 18, 2019

@commandini Can you help me out with the extension of that.
May be we can pass two schema registry serde to AvroSchemaRegistrySerde and then use it .
Can you tell me how to do it ?
Let's say i want to use same schema for both key and value, how can this be done? As i do not see the code for producer in the serde.

@andreiadamian
Copy link
Collaborator

@ilyasahmed24 Unfortunately, we do not support custom key serialization at the moment.
The only way to achieve this is to set the right serialized value to a property before saving record to a Kafka data set.

@ilyasahmed24
Copy link
Author

ilyasahmed24 commented Dec 18, 2019

@andreiadamian Let's say I have serialized the key in the same serde and set it to a clipboard page in a property, now how do i pass this to data set?

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