console-consumer
Command Info
This tool is used to run a Kafka Consumer from the command line. It will consume records from Kafka and output them in the terminal.
Command Usage
Usage of console-consumer:
-bootstrap-host string
kafka bootstrap host (default "localhost")
-bootstrap-port int
kafka bootstrap port (default 9092)
-client-id string
client-id to pass along to kafka (default "warpstream-cli")
-enable-tls
dial with TLS or not
-from-beginning
start with the earliest message present in the topic partition rather than the latest message
-kafka-log-level string
the log level to set on the kafka client, accepted values are DEBUG, INFO, WARN, ERROR (default "WARN")
-max-messages int
he maximum number of messages to consume before exiting. If not 0, consumption is continual.
-sasl-password string
password for SASL authentication
-sasl-scram
uses sasl scram authentication (sasl plain by default)
-sasl-username string
username for SASL authentication
-tls-client-cert-file string
path to the X.509 certificate file in PEM format for the client
-tls-client-key-file string
path to the X.509 private key file in PEM format for the client
-tls-server-ca-cert-file string
path to the X.509 certificate file in PEM format for the server certificate authority. If not specified, the host's root certificate pool will be used for server certificate verification.
-topic string
the topic to consume on
Example
$ warpstream cli-beta console-consumer -topic foo -from-beginning
Every new record written to topic: foo will be printed below (ctrl + c then ctrl + d to exit)
[foo::0] (0) =hello
[foo::0] (1) =world
[foo::0] (2) =this
[foo::0] (3) =is
[foo::0] (4) =my
[foo::0] (5) =topic
Last updated
Was this helpful?