我一直在使用下面的 CMD 从已打开纯文本端口的 Kafka 队列中获取最新的偏移量
kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list server:9092 --topic sample_topic --time -1
Run Code Online (Sandbox Code Playgroud)
但是,现在我们只打开了 SSL 端口,所以我尝试将 SSL 详细信息作为属性文件传递
kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list server:9093 --topic sample_topic --time -1 --consumer-config /path/to/file
Run Code Online (Sandbox Code Playgroud)
得到以下错误 -
Exception in thread "main" joptsimple.UnrecognizedOptionException: consumer-config is not a recognized option
Run Code Online (Sandbox Code Playgroud)
如何将 SSL 详细信息传递给此命令?这些是 kafka-run-class.sh kafka.tools.GetOffsetShell 的所有可用参数
--broker-list <String: hostname:and port,...,hostname:port>
--max-wait-ms <Integer: ms>
--offsets <Integer: count>
--partitions <String: partition ids>
--time <Long: timestamp/-1(latest)/-2
--topic <String: topic>
Run Code Online (Sandbox Code Playgroud) apache-kafka ×1