在kafkaspoutout中关闭acking,同时尊重maxpoutpending

sd2nnvve  于 2021-06-08  发布在  Kafka
关注(0)|答案(1)|浏览(206)

我用的是风暴0.9.3。我正在尝试为我的拓扑关闭每个元组的确认。我将config.topology\u acker\u executors设置为0,将maxpoutpending设置为500。当我运行我的拓扑结构时,我注意到maxpoutpending被忽略了,喷口继续发射远远超过了这个限制。这是我的配置-

config.setNumWorkers(3);
config.setMaxSpoutPending(500);
config.put("topology.sleep.spout.wait.strategy.time.ms", 50);
config.put("topology.message.timeout.secs", 300);
config.put(Config.TOPOLOGY_ACKER_EXECUTORS, 0);

我用kafkaspout来读Kafka的文章,用一个螺栓来消耗信息。

1l5u6lss

1l5u6lss1#

通过设置 TOPOLOGY_ACKER_EXECUTORS 如果设置为0,storm将在所有元组离开喷口时立即确认它们,这可能不可靠,因为没有任何机制可以检查元组是否已处理或失败。
通过设置 setMaxSpoutPending 告诉storm要处理的喷口上挂起的最大元组数。maxspoutpending不会限制您的输出。如果您想查看storm拓扑的实际输出频率,请检查 topology latency 在storm ui中运行storm拓扑。

相关问题