简体   繁体   English

在kafka上写相同的话题

[英]Writing to same topic on kafka

使用confluent-kafka-dotnet v0.9.5上的ProduceAsync方法在Kafka上写入同一主题时,它将覆盖默认分区和偏移量(P0,O0)上的数据,还是将其写入分区上的下一个可用偏移量?

It will not overwrite. 它不会覆盖。 Please refer to the documentation here Kafka Topics 请参阅此处的文档Kafka主题

Brief explaination 简要说明

Kafka works with pub-sub mechanism, meaning publishers send data to a topic and there can be multiple of them. Kafka使用pub-sub机制,这意味着发布者将数据发送到某个主题,并且其中可以有多个。 The data will be written to current offset and any subscriber who is reading from this topic will be given data as per the consumer offset. 数据将被写入当前偏移量,并且从该主题读取的任何订户都将根据使用者偏移量获得数据。 The data will be retained to disk in a kafka cluster as per the configuration for desired interval of time or desired size of the file. 数据将根据配置保留在kafka群集中的磁盘上,以保留所需的时间间隔或所需的文件大小。

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

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