Apache kafka 卡夫卡唱片不是';不要被删除

Apache kafka 卡夫卡唱片不是';不要被删除,apache-kafka,Apache Kafka,我试图通过以下操作从主题中删除卡夫卡记录: bin/kafka-delete-records.sh --bootstrap-server myserver:myport --offset-json-file offset.json my offset.json如下所示: {"partitions": [{"topic": "mytopic", "partition": 0, "offset": 127}], "version":1} 当我运行脚本时,我得到以下消息: ➜ local-kaf

我试图通过以下操作从主题中删除卡夫卡记录:

bin/kafka-delete-records.sh --bootstrap-server myserver:myport --offset-json-file offset.json
my offset.json如下所示:

{"partitions": [{"topic": "mytopic", "partition": 0, "offset": 127}], "version":1}
当我运行脚本时,我得到以下消息:

➜  local-kafka_2.12-2.0.0 bin/kafka-delete-records.sh --bootstrap-server myip:myport --offset-json-file offset.json
Executing records delete operation
Records delete operation completed:
[2019-02-02 16:54:24,867] WARN [AdminClient clientId=adminclient-1] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
partition: mytopic-0  error: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
我注意到,当我运行
kafka consumer group.sh

我的配置如下:

问题

  • 我错过了什么。为什么主题中的卡夫卡记录没有删除

您收到以下警告:“无法建立到节点-1的连接。代理可能不可用。”您可以使用来自
mytopic
的消息吗?检查一下你的经纪人是否有空。另外,请确保拼写错误。您希望在卡夫卡消费群体中看到什么?
delete records
命令删除偏移之前的所有消息。。。它不会“减少”这些偏移量。您收到以下警告:“无法建立到节点-1的连接。代理可能不可用。”您可以使用来自
mytopic
的消息吗?检查一下你的经纪人是否有空。另外,请确保拼写错误。您希望在卡夫卡消费群体中看到什么?
delete records
命令删除偏移之前的所有消息。。。它不会“减少”这些偏移量