Skip to content

GoUtilsHub/kafka-go-microservices

 
 

Repository files navigation

Kafka Producers and Consumers with Golang

This project demonstrates how to build Kafka Producers and Consumers using the Go programming language (Golang). It leverages the confluent-kafka-go library to connect and interact with Kafka brokers.

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Installation
  4. Project Structure
  5. Additional Resources
  6. Contributing

1. Introduction

This project provides a simple example of how to create Kafka producers and consumers using Golang. Producers are responsible for sending data (messages) to Kafka topics, while consumers subscribe to Kafka topics to read and process messages.

2. Prerequisites

Before running the project, ensure you have the following:

  • Go installed (version 1.16 or later)
  • Kafka installed and running on your local machine or server
  • A working knowledge of Kafka and Go
  • Confluent's Kafka Go client library: confluent-kafka-go

3. Installation

git clone https://github.com/yourusername/kafka-go-producer-consumer.git
cd kafka-go-producer-consumer

4. Project Structure

  kafka-go-producer-consumer/
  │
  ├── order-service          # Kafka Producer implementation
  ├── product-service          # Kafka Consumer implementation
  ├── user-service               # Go module definition
  ├── docker-compose.yml
  ├── kafka_info.txt
  └── README.md            # Project documentation

5. Additional Resources

  • Kafka Official Documentation
  • Confluent Kafka Golang Client
  • Go Official Documentation

6. Contributing

Feel free to open issues or submit pull requests if you'd like to contribute to this project. Contributions are welcome and appreciated!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%