kafkacat一半时间返回主题内容

u0njafvf  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(277)

怎么可能我运行Kafka卡特的两次中有一次,它没有从主题中返回任何东西?

  1. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
  2. {"hello": "world"}
  3. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
  4. % Reached end of topic what-is-going-on2 [0] at offset 0
  5. bash-3.2$
  6. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
  7. % Reached end of topic what-is-going-on2 [0] at offset 0
  8. bash-3.2$
  9. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
  10. % Reached end of topic what-is-going-on2 [0] at offset 0
  11. bash-3.2$
  12. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
  13. % Reached end of topic what-is-going-on2 [0] at offset 0
  14. bash-3.2$
  15. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
  16. % Reached end of topic what-is-going-on2 [0] at offset 0
  17. bash-3.2$
  18. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
  19. % Reached end of topic what-is-going-on2 [0] at offset 0
  20. bash-3.2$
  21. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c1
  22. {"hello": "world"}

有人能解释一下是什么导致了这种随机行为吗?
我在其中添加了第二个元素,得到了相同的行为:

  1. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c2
  2. {"hello": "world"}
  3. {"hello": "world2"}
  4. bash-3.2$ kafkacat -b localhost:9092 -t "what-is-going-on2" -C -c2
  5. % Reached end of topic what-is-going-on2 [0] at offset 0

这是我的Kafka卡特版本:

  1. kafkacat - Apache Kafka producer and consumer tool
  2. https://github.com/edenhill/kafkacat
  3. Copyright (c) 2014-2019, Magnus Edenhill
  4. 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)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题