KafkaAvroSerializer for serializing Avro without schema.registry.url

前端 未结 5 1031
轮回少年
轮回少年 2021-02-02 13:33

I\'m a noob to Kafka and Avro. So i have been trying to get the Producer/Consumer running. So far i have been able to produce and consume simple Bytes and Strings, using the fol

5条回答
  •  再見小時候
    2021-02-02 14:18

    You can create your Custom Avro serialiser, then even without Schema registry you would be able to produce records to topics. Check below article.

    https://codenotfound.com/spring-kafka-apache-avro-serializer-deserializer-example.html

    Here they have use Kafkatemplate . I have tried using

    KafkaProducer UserKafkaProducer
    

    It is working fine But if you want to use KafkaAvroSerialiser, you need to give Schema registryURL

提交回复
热议问题