首页 > 代码库 > kafka8 于kafka7 兼容性的问题
kafka8 于kafka7 兼容性的问题
kafka8 于kafka7 兼容性的问题:本地运行kafka8的客户端,一切ok,但是到了linux上就包下面的错误:
原因:项目中存在kafka7的jar,所以在linux上运行kafka8的客户端的时候,会加载kafka7的scale 的包。
所以删除kafka7的jar 就ok
Exception in thread "Thread-21" java.lang.IllegalArgumentException: Missing required property ‘groupid‘
at kafka.utils.Utils$.getString(Utils.scala:274)
at kafka.consumer.ConsumerConfig.<init>(ConsumerConfig.scala:48)
at com.sohu.smc.common.kafka.Kafka.getConsumer(Kafka.java:145)
at com.sohu.smc.common.kafka.Kafka.consumeForever(Kafka.java:173)
at com.sohu.smc.kafka.interfacelog.KafkaModuleConsumer$ModelConsumer.run(KafkaModuleConsumer.java:53)
at java.lang.Thread.run(Thread.java:662)
java.lang.IllegalArgumentException: Missing required property ‘groupid‘
at kafka.utils.Utils$.getString(Utils.scala:274)
at kafka.consumer.ConsumerConfig.<init>(ConsumerConfig.scala:48)
at com.sohu.smc.common.kafka.Kafka.getConsumer(Kafka.java:145)
at com.sohu.smc.common.kafka.Kafka.consumeForever(Kafka.java:173)
at com.sohu.smc.kafka.interfacelog.KafkaModuleConsumer$ModelConsumer.run(KafkaModuleConsumer.java:53)
at java.lang.Thread.run(Thread.java:662)
kafka8 于kafka7 兼容性的问题