KAFKA中每笔交易的消息数量
在绩效真正遭受损失之前,是否有有关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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在Confluent的博客中找到了这一点。事实证明,每个transactin的每条消息的开销不会增加;相反,如果您每笔交易有更多消息,则实际上会增加吞吐量。
实际上,随着您向交易添加更多消息时,每个消息的平均开销会减少。
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.