Karaf - Kafka OSGI bundle - Producer issue

前端 未结 3 917
臣服心动
臣服心动 2021-01-14 05:46

I am trying to create a simple bundle for Kafka producer in apache Karaf version 4.0.3 .

Here is my Java code



        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-14 06:21

    Might me useful for others, work around suggested in JIRA

    props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, org.apache.kafka.common.serialization.StringSerializer.class);
    
    props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, org.apache.kafka.common.serialization.StringSerializer.class);
    

提交回复
热议问题