An open API service indexing awesome lists of open source software.

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: 19 days ago
JSON representation

Golang Kafka consumer and producer example

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`

![](producer.png)

__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)

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fvsouza%2Fgo-kafka-example.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fvsouza%2Fgo-kafka-example?ref=badge_large)