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.
- Introduction
- Prerequisites
- Installation
- Project Structure
- Additional Resources
- Contributing
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.
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
git clone https://github.com/yourusername/kafka-go-producer-consumer.git
cd kafka-go-producer-consumer
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
- Kafka Official Documentation
- Confluent Kafka Golang Client
- Go Official Documentation
Feel free to open issues or submit pull requests if you'd like to contribute to this project. Contributions are welcome and appreciated!