HawkMQ is a high-performance, distributed, fault-tolerant message queue written in Go.
Designed for low-latency, high-throughput messaging with built-in replication, persistence, and leader election.
- Single-node in-memory queue (FIFO, pub/sub)
- Thread-safe queue implementation
- TCP-based client/server architecture
- Basic pub/sub functionality
- WAL (Write-Ahead Log) for persistence
- Multi-node replication using Raft
- gRPC/TCP networking
- Backpressure handling & monitoring
- Go 1.22+
Clone the repo:
git clone https://github.com/sahinfalcon/hawkmq.git
cd hawkmqStart the server:
go run cmd/server/main.goUse the client to publish/consume messages:
# Publish a message
go run cmd/client/main.go publish "simon says"
# Consume a message
go run cmd/client/main.go consumeRun tests:
go test ./...- Thread-safe in-memory queue using mutex for synchronization
- TCP-based client/server communication
- Basic PUBLISH/CONSUME commands
- Concurrent request handling
- Comprehensive test coverage including concurrency tests
| Stage | Feature | Status |
|---|---|---|
| 1 | In-memory queue | ✅ Complete |
| 2 | WAL-based persistence | 🚧 In progress |
| 3 | Raft leader election & failover | ⏳ Planned |
| 4 | Multi-node replication | ⏳ Planned |
| 5 | Performance optimizations | ⏳ Planned |
MIT