Skip to content

FillipdotS/kafka-go-experiment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka Go Experiment

A small project to play around with Kafka and Go, consisting of a producer module and a consumer module. Everything is dockerized and can be run with docker-compose.

The events being sent into Kafka are fake "purchase" events, they include a unique uuid, buyer's name, item and price. They are serialized to json before being sent.

Showcase

Below are the logs of two docker containers, showing the producer sending events and the consumer receiving them.

Top - Consumer, Bottom - Producer

go-kafka-experiment.mp4

Modules

There are three modules in this project:

  1. producer - sends events to Kafka
  2. consumer - receives events from Kafka
  3. util - contains shared utility code

Each one has a seperate Dockerfile, except for util. The expected way to run them is with docker-compose, as it contains the build context.

Development

  1. Run docker-compose up

  2. Rerun consumer or producer as appropriate, using docker-compose run --build <consumer|producer>

About

Experiment project to play around with Golang and Kafka (with Docker!)

Topics

Resources

Stars

Watchers

Forks

Contributors