The producer generally refreshes the topic metadata from brokers when there is a failure (partition missing, leader not available…). It will also poll regularly (default: every 10min so 600000ms). If you set this to a negative value, metadata will only get refreshed on failure. If you set this to zero, the metadata will get refreshed after each message sent (not recommended) Important note: the refresh happen only AFTER the message is sent, so if the producer never sends a message the metadata is never refreshed
topic.metadata.refresh.interval.ms
最新推荐文章于 2025-04-02 16:10:35 发布
本文介绍了Kafka生产者如何从代理刷新主题元数据的过程。默认情况下,每10分钟轮询一次,也可以设置为仅在失败时刷新或每次发送消息后刷新。需要注意的是,元数据的刷新发生在消息发送之后。

304

被折叠的 条评论
为什么被折叠?



