'How to change SubjectNameStrategy and use different schemas in confluent-kafka-python's AvroProducer?

I am using confluent-kafka-python's AvroProducer for serializing. How could I change the SubjectNameStrategy to RecordNameStrategy so that I can use different schemas in the same topic ? Or is there a better way to achieve the same goal ?



Solution 1:[1]

Try setting the subject.name.strategy in the AvroSerializer to record_subject_name_strategy

https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#avroserializer

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 OneCricketeer