KAFKA中每笔交易的消息数量

发布于 2025-02-12 13:13:00 字数 209 浏览 2 评论 0原文

在绩效真正遭受损失之前,是否有有关KAFKA生产商交易可以涉及多少个消息和/或分区的准则?

显然,涉及的分区越多,需要更多的协调。但是在Kafka流中,默认提交间隔为100ms。在那个时候,通常可以通过流线程处理数百个消息。并取决于拓扑,这可能涉及许多不同的输出主题(以及扩展,分区)。这是否意味着可以使用数百个消息和数十个分区来推动交易安全?

我在文档中找不到有关此的信息。

Are there guidelines on how many messages and/or partitions can be involved in a Kafka Producer Transaction before performance really starts to suffer?

Obviously, the more partitions are involved, the more coordination is required. But in Kafka Streams, for example, the default commit interval is 100ms. In that time, normally hundreds of messages can be processed by a Stream thread. And depending on the topology, that may involve many different output topics (and by extension, partitions). Does that mean that it's safe to push transactions with hundreds of messages and dozens of partitions?

I can't find anything about this in the documentation.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

将军与妓 2025-02-19 13:13:01

https://www.confluent.io/blog/transactions-apache-kafka/
I found this in Confluent's blog. Turns out that the overhead doesn't increase per message per transactin; rather, you actually increase throughput if you have more messages per transaction.

In fact, the average overhead per message decreases as you add more messages to the transaction.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文