Skip to content

TomWright/sarama-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sarama-example

Start kafka with:

docker-compose --project-name=sarama-example up

Open 3 new terminal windows and run the following in each:

KAFKA_CONSUMER_ADDRESS=localhost:9092 KAFKA_PRODUCER_ADDRESS=localhost:9092 go run main.go

Every 20 seconds, each instance of the app will publish 5 messages.

You should see that only 1 of the apps will be receiving any messages.

Even stopping the runner that is receiving the messages to cause a rebalance just pushes all messages to one of the other consumers.

Run the following to clean up kafka

docker-compose --project-name=sarama-example down

docker-compose --project-name=sarama-example rm

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages