File: README.md

package info (click to toggle)
golang-github-shopify-sarama 1.22.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,728 kB
  • sloc: sh: 112; makefile: 43
file content (29 lines) | stat: -rw-r--r-- 948 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# kafka-console-consumer

A simple command line tool to consume partitions of a topic and print the
messages on the standard output.

### Installation

    go get github.com/Shopify/sarama/tools/kafka-console-consumer

### Usage

    # Minimum invocation
    kafka-console-consumer -topic=test -brokers=kafka1:9092

    # It will pick up a KAFKA_PEERS environment variable
    export KAFKA_PEERS=kafka1:9092,kafka2:9092,kafka3:9092
    kafka-console-consumer -topic=test

    # You can specify the offset you want to start at. It can be either
    # `oldest`, `newest`. The default is `newest`.
    kafka-console-consumer -topic=test -offset=oldest
    kafka-console-consumer -topic=test -offset=newest

    # You can specify the partition(s) you want to consume as a comma-separated
    # list. The default is `all`.
    kafka-console-consumer -topic=test -partitions=1,2,3

    # Display all command line options
    kafka-console-consumer -help