怎么可能我运行Kafka卡特的两次中有一次,它没有从主题中返回任何东西?
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
这是我的Kafka卡特版本:
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)
暂无答案!
目前还没有任何答案,快来回答吧!