Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache kafka 卡夫卡塔一半时间都在返回主题内容_Apache Kafka_Kafkacat - Fatal编程技术网

Apache kafka 卡夫卡塔一半时间都在返回主题内容

Apache kafka 卡夫卡塔一半时间都在返回主题内容,apache-kafka,kafkacat,Apache Kafka,Kafkacat,我主持卡夫卡卡特的两次演讲中,有一次没有从主题中返回任何东西,这怎么可能呢 bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1 {"hello": "world"} bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1 % Reached end of to

我主持卡夫卡卡特的两次演讲中,有一次没有从主题中返回任何东西,这怎么可能呢

bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
{"hello": "world"}
bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
% Reached end of topic what-is-going-on2 [0] at offset 0
bash-3.2$
bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
% Reached end of topic what-is-going-on2 [0] at offset 0
bash-3.2$
bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
% Reached end of topic what-is-going-on2 [0] at offset 0
bash-3.2$
bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
% Reached end of topic what-is-going-on2 [0] at offset 0
bash-3.2$
bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
% Reached end of topic what-is-going-on2 [0] at offset 0
bash-3.2$
bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
% Reached end of topic what-is-going-on2 [0] at offset 0
bash-3.2$
bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
{"hello": "world"}
有人能解释一下是什么导致了这种随机行为吗

我在其中添加了第二个元素,得到了相同的行为:

bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c2
{"hello": "world"}
{"hello": "world2"}
bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c2
% Reached end of topic what-is-going-on2 [0] at offset 0
这是我的卡夫卡塔版本:

kafkacat - Apache Kafka producer and consumer tool
https://github.com/edenhill/kafkacat
Copyright (c) 2014-2019, Magnus Edenhill
Version 1.5.0 (JSON, Avro, librdkafka 1.4.2 builtin.features=gzip,snappy,ssl,sasl,regex,lz4,sasl_gssapi,sasl_plain,sasl_scram,plugins,zstd,sasl_oauthbearer)