Debian Codegraph @

tools/kafka-console-partitionconsumer/README.md

raw
1 # kafka-console-partitionconsumer
2
3 NOTE: this tool is deprecated in favour of the more general and more powerful
4 `kafka-console-consumer`.
5
6 A simple command line tool to consume a partition of a topic and print the messages
7 on the standard output.
8
9 ### Installation
10
11 go get github.com/Shopify/sarama/tools/kafka-console-partitionconsumer
12
13 ### Usage
14
15 # Minimum invocation
16 kafka-console-partitionconsumer -topic=test -partition=4 -brokers=kafka1:9092
17
18 # It will pick up a KAFKA_PEERS environment variable
19 export KAFKA_PEERS=kafka1:9092,kafka2:9092,kafka3:9092
20 kafka-console-partitionconsumer -topic=test -partition=4
21
22 # You can specify the offset you want to start at. It can be either
23 # `oldest`, `newest`, or a specific offset number
24 kafka-console-partitionconsumer -topic=test -partition=3 -offset=oldest
25 kafka-console-partitionconsumer -topic=test -partition=2 -offset=1337
26
27 # Display all command line options
28 kafka-console-partitionconsumer -help