GitHunt
JA

JagTheFriend/Kafka-Golang

Go application demonstrating a Kafka producer and consumer running in parallel using kafka-go with local Docker Kafka setup

Kafka Go Producer & Consumer

A simple Go application that runs a Kafka producer and consumer in parallel using kafka-go.
Kafka runs locally in Docker and is accessed from the host.


Prerequisites

  • Docker & Docker Compose
  • Go 1.20+
  • Kafka running on 127.0.0.1:9093
  • Kafka UI running on http://localhost:8080

Run the App

Install dependency:

docker compose up

What It Does

  • Producer sends one message per second
  • Consumer reads messages using a consumer group
  • Producer and consumer run concurrently
  • Kafka address: 127.0.0.1:9093

Notes

  • 127.0.0.1 is required (not localhost)
  • Designed for local development and testing

Languages

Go95.9%Dockerfile4.1%

Contributors

Creative Commons Zero v1.0 Universal
Created January 25, 2026
Updated February 3, 2026
JagTheFriend/Kafka-Golang | GitHunt