https://github.com/vsouza/go-kafka-example
Golang Kafka consumer and producer example
https://github.com/vsouza/go-kafka-example
examples golang kafka producer-consumer stream-processing
Last synced: 9 months ago
JSON representation
Golang Kafka consumer and producer example
- Host: GitHub
- URL: https://github.com/vsouza/go-kafka-example
- Owner: vsouza
- License: mit
- Created: 2017-05-19T17:35:21.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-19T20:02:18.000Z (over 2 years ago)
- Last Synced: 2025-09-05T06:36:34.871Z (10 months ago)
- Topics: examples, golang, kafka, producer-consumer, stream-processing
- Language: Go
- Homepage:
- Size: 505 KB
- Stars: 172
- Watchers: 8
- Forks: 59
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Golang Kafka Example
>Sample Golang Kafka Consumer and Producer
## Setup
[Apache Kafka Quickstart](https://kafka.apache.org/quickstart)
__Producer__
`go run cmd/producer/main.go`

__Consumer__
flags:
* brokerList
* topic
* partition (default: 0)
* offsetType
* messageCountStart (default: 0)
`go run cmd/consumer/main.go`
```
Received messages Something Cool #1
Received messages Something Cool #2
Received messages Something Cool #3
Received messages Something Cool #4
Received messages Something Cool #5
```
## Contribute
We would love you for the contribution to **go-kafka-example**, check the ``LICENSE`` file for more info.
## Meta
Vinicius Souza – [@iamvsouza](https://twitter.com/iamvsouza) – hi@vsouza.com
[https://github.com/vsouza/go-kafka-example](https://github.com/vsouza/go-kafka-example)
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fvsouza%2Fgo-kafka-example?ref=badge_large)