apache-kafkaavroconfluent-schema-registryconfluent-kafka-python

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

  • 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