kafka生产者时不时报这个错
spark-streaming-kafka-0-10_2.11 用spark处理数据,对某些符合条件的数据发送到kafka
producer.send(new ProducerRecord<String,Notify>(topic, data), (metaData, exception) -> {
if (exception != null) {
log.error(exception)
把相同的key进行压缩。
$ kafka-topics --create --zookeeper "zookeeper-0.zookeeper" --partitions 1 --replication-factor 1 --topic topicB --config cleanup.policy=compact
Created topic "topicB".
$ kafka-topics --describe --zookeeper "zookeeper-0.zookeeper" --topic topicB
Topic:topicB PartitionCount:1 ReplicationFactor:1 Configs:cleanup.policy=compact
Topic: topicB Partition: 0 Leader: 1 Replicas: 1 Isr: 1
你描述下那个topic,看看是否有这个策略。