我通过以下更改在生产者端启用了快速压缩:
props.put(ProducerConfig.COMPRESSION_TYPE_CONFIG,"snappy");
现在是否需要在消费者方面进行任何更改?我检查了Consumer.config,但在那里没有找到任何compression_type参数。
而且,当我运行该代码消息时,它并没有到达用户端,并且出现以下错误:
[1/10/20 17:25:39:759 UTC] 00018027 org.apache.kafka.clients.consumer.KafkaConsumer I [Consumer clientId=com.ora.def.lieo, groupId=group-cedm] Seeking to offset 320 for partition Party-Resolved-Check-0
[1/10/20 17:25:49:760 UTC] 00018029 com.ibm.cedm.kafka.KafkaConsumerService E Received exception when fetching the next record from Party-Resolved-Check-0. If needed, please seek past the record to continue consumption.
不需要解压缩配置。消费者会自动处理。
不清楚您的错误与压缩有何关系