This tool helps to read data from Kafka topics and outputs it to standard output.
Option Description
------ -----------
--bootstrap-server <String: server to REQUIRED: The server(s) to connect to.
connect to>
--consumer-property <String: A mechanism to pass user-defined
consumer_prop> properties in the form key=value to
the consumer.
--consumer.config <String: config file> Consumer config properties file. Note
that [consumer-property] takes
precedence over this config.
--enable-systest-events Log lifecycle events of the consumer
in addition to logging consumed
messages. (This is specific for
system tests.)
--formatter <String: class> The name of a class to use for
formatting kafka messages for
display. (default: org.apache.kafka.
tools.consumer.
DefaultMessageFormatter)
--formatter-config <String: config Config properties file to initialize
file> the message formatter. Note that
[property] takes precedence over
this config.
--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.
--group <String: consumer group id> The consumer group id of the consumer.
--help Print usage information.
--include <String: Java regex (String)> Regular expression specifying list of
topics to include for consumption.
--isolation-level <String> Set to read_committed in order to
filter out transactional messages
which are not committed. Set to
read_uncommitted to read all
messages. (default: read_uncommitted)
--key-deserializer <String:
deserializer for key>
--max-messages <Integer: num_messages> The maximum number of messages to
consume before exiting. If not set,
consumption is continual.
--offset <String: consume offset> The offset to consume from (a non-
negative number), or 'earliest'
which means from beginning, or
'latest' which means from end
(default: latest)
--partition <Integer: partition> The partition to consume from.
Consumption starts from the end of
the partition unless '--offset' is
specified.
--property <String: prop> The properties to initialize the
message formatter. Default
properties include:
print.timestamp=true|false
print.key=true|false
print.offset=true|false
print.partition=true|false
print.headers=true|false
print.value=true|false
key.separator=<key.separator>
line.separator=<line.separator>
headers.separator=<line.separator>
null.literal=<null.literal>
key.deserializer=<key.deserializer>
value.deserializer=<value.
deserializer>
header.deserializer=<header.
deserializer>
Users can also pass in customized
properties for their formatter; more
specifically, users can pass in
properties keyed with 'key.
deserializer.', 'value.
deserializer.' and 'headers.
deserializer.' prefixes to configure
their deserializers.
--skip-message-on-error If there is an error when processing a
message, skip it instead of halt.
--timeout-ms <Long: timeout_ms> If specified, exit if no message is
available for consumption for the
specified interval.
--topic <String: topic> The topic to consume on.
--value-deserializer <String:
deserializer for values>
--version Display Kafka version.
--whitelist <String: Java regex DEPRECATED, use --include instead;
(String)> ignored if --include specified.
Regular expression specifying list
of topics to include for consumption.
Options (22)
| Option | Description | Source |
|---|
--bootstrap-server String: | REQUIRED: The server(s) to connect to. | help |
--consumer-property String: | A mechanism to pass user-defined consumer_prop> properties in the form key=value to the consumer. | help |
--consumer.config String: | Consumer config properties file. | help |
--enable-systest-events | Log lifecycle events of the consumer in addition to logging consumed messages. | help |
--formatter String: | The name of a class to use for formatting kafka messages for display. | help |
--formatter-config String: | Config properties file to initialize file> the message formatter. | help |
--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. | help |
--group String: | The consumer group id of the consumer. | help |
--help | Print usage information. | help |
--include String: | Regular expression specifying list of topics to include for consumption. | help |
--isolation-level String | Set to read_committed in order to filter out transactional messages which are not committed. | help |
--key-deserializer String: | deserializer for key> | help |
--max-messages Integer: | The maximum number of messages to consume before exiting. | help |
--offset String: | The offset to consume from (a non- negative number), or 'earliest' which means from beginning, or 'latest' which means from end (default: latest) | help |
--partition Integer: | The partition to consume from. | help |
--property String: | The properties to initialize the message formatter. | help |
--skip-message-on-error | If there is an error when processing a message, skip it instead of halt. | help |
--timeout-ms Long: | If specified, exit if no message is available for consumption for the specified interval. | help |
--topic String: | The topic to consume on. | help |
--value-deserializer String: | deserializer for values> | help |
--version | Display Kafka version. | help |
--whitelist String: | DEPRECATED, use --include instead; | help |
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.