简体   繁体   English

Kafka - 编写同一主题和消息顺序的多个制作人很重要

[英]Kafka - Multiple producers writing to same topic and order of message is important

Let us say there are two Producers P1 and P2 . 让我们说有两个生产者P1 and P2
P1 makes attempt to write log L1 at time t1 to a partition PT however it gets written at t2 due to network latency. P1尝试在时间t1将日志L1写入分区PT,但是由于网络延迟,它在t2写入。
P2 makes attempt to write log L2 at time t3 to a partition PT however it gets written at t4 due to network latency. P2尝试在时间t3将日志L2写入分区PT,但是由于网络延迟,它在t4被写入。

Let us say t1<t3 however t2>t4 so what will be the final order of L1 and L2 in the partition PT? 让我们说t1<t3然而t2>t4那么分区PT中L1和L2的最终顺序是什么?

是的,如果两个生产者都写入同一个分区,则无论生产者何时发送消息,消息的顺序都将是接收这些消息的顺序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM