This project is designed to be a Go Meetup Example Project, demonstrating how to build a scalable microservices architecture using:
- gRPC & HTTP servers for communication
- MongoDB for persistent storage
- RabbitMQ for message queue handling
- Docker to containerize dependencies
- Graceful shutdown handling for fail-safe operations
- Health Check Endpoints to monitor the status of each service
- Retry & Circuit Breaker Mechanism to prevent cascading failures
- Worker Pool & Semaphore Concept to prevent goroutine overload
This project serves as a real-world example of implementing high availability, failover handling, and dependency cleanup in a Go microservices environment.
Ensure you have the following tools installed on your system:
- Docker - Required to run MongoDB and RabbitMQ
- Go - Required for compiling and running the application
- Protocol Buffers (protoc) - Required for gRPC services
protoc-gen-go&protoc-gen-go-grpc- Required for generating gRPC code
git clone https://github.com/your-repo/go-meetup-example.git
cd go-meetup-exampleEnsure Docker is running, then start the required services:
docker-compose up -dThis will start:
- MongoDB on
localhost:27017 - RabbitMQ on
localhost:5672(management UI onlocalhost:15672)
To verify containers are running:
docker psEnsure all dependencies are installed:
go mod tidyInstall protobuf dependencies:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latestThen generate the gRPC code:
protoc --go_out=. --go-grpc_out=. proto/*.protoStart the required services:
go run cmd/http/main.gogo run cmd/grpc/main.gogo run cmd/cron/main.gogo run cmd/consumer/main.go- Check HTTP Server: Open
http://localhost:8080and test API calls. - Check RabbitMQ UI: Visit
http://localhost:15672(user:guest, pass:guest). - Check MongoDB Connection: Run
docker exec -it mongodb mongosh.
To gracefully stop all services:
docker-compose down✅ Ensures MongoDB & RabbitMQ run correctly before services start
✅ Provides complete setup for gRPC and HTTP-based microservices
✅ Includes protoc setup for gRPC message serialization
✅ Ensures smooth onboarding for new contributors
Now, anyone can clone, set up, and run the project seamlessly! 🚀