kafka消费者命令行的使用方法
2019獨角獸企業重金招聘Python工程師標準>>>
root@ocdata07 bin]# ./kafka-console-consumer.sh
The console consumer is a tool that reads data from Kafka and outputs it to standard output.
Option????????????????????????????????? Description?????????????????????????? ?
------????????????????????????????????? -----------?????????????????????????? ?
--blacklist <blacklist>???????????????? Blacklist of topics to exclude from?? ?
????????????????????????????????????????? consumption.??????????????????????? ?
--consumer.config <config file>???????? Consumer config properties file.????? ?
--csv-reporter-enabled????????????????? If set, the CSV metrics reporter will ?
????????????????????????????????????????? be enabled????????????????????????? ?
--delete-consumer-offsets?????????????? If specified, the consumer path in??? ?
????????????????????????????????????????? zookeeper is deleted when starting up
--formatter <class>???????????????????? The name of a class to use for??????? ?
????????????????????????????????????????? formatting kafka messages for?????? ?
????????????????????????????????????????? display. (default: kafka.tools.???? ?
????????????????????????????????????????? DefaultMessageFormatter)??????????? ?
--from-beginning??????????????????????? If the consumer does not already have ?
????????????????????????????????????????? an established offset to consume??? ?
????????????????????????????????????????? from, start with the earliest?????? ?
????????????????????????????????????????? message present in the log rather?? ?
????????????????????????????????????????? than the latest message.??????????? ?
--max-messages <Integer: num_messages>? The maximum number of messages to???? ?
????????????????????????????????????????? consume before exiting. If not set, ?
????????????????????????????????????????? consumption is continual.?????????? ?
--metrics-dir <metrics dictory>???????? If csv-reporter-enable is set, and??? ?
????????????????????????????????????????? this parameter isset, the csv?????? ?
????????????????????????????????????????? metrics will be outputed here?????? ?
--property <prop>???????????????????????????????????????????????????????????? ?
--skip-message-on-error???????????????? If there is an error when processing a
????????????????????????????????????????? message, skip it instead of halt.?? ?
--topic <topic>???????????????????????? The topic id to consume on.?????????? ?
--whitelist <whitelist>???????????????? Whitelist of topics to include for??? ?
????????????????????????????????????????? consumption.??????????????????????? ?
--zookeeper <urls>????????????????????? REQUIRED: The connection string for?? ?
????????????????????????????????????????? the zookeeper connection in the form
????????????????????????????????????????? host:port. Multiple URLS can be???? ?
????????????????????????????????????????? given to allow fail-over.?????
因此要同時啟動 多個不同組的消費者,要么指定不同的配置文件,要么設置不同的property
不過設置consumer.config 的試過了 --可以用
但是property的只是在java api中用過 因此我感覺這里也可以用(猜想) ??
轉載于:https://my.oschina.net/u/2329222/blog/479463
總結
以上是生活随笔為你收集整理的kafka消费者命令行的使用方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ruby里面的毒瘤
- 下一篇: 如何解决开发人员的工作无法量化的问题