sarama-easy

module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: Apache-2.0

README

sarama-easy

Sarama is a Golang client for Apache Kafka. This is a light wrapper and example demo for Sarama's async producer and consumer (including auto-rebalancing consumer groups.)

Usage

Run the demo producer/consumer
# From the root dir of the repo checkout:
script/build

docker-compose up

# From another terminal session:
bin/consumer-example &

bin/producer-example
Result
  • Producer will emit 10 messages and a sentinel value to the example topic, then shut down.
  • Consumer will receive 10 example messages, and a sentinel message triggering it's own shutdown.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL