anas727189/message-broker-system — explained in plain English
Analysis updated 2026-05-18
Study how a Kafka-like broker stores and replays messages on disk.
Learn how consumer offsets and consumer groups track reading progress.
Practice building a TCP-based binary protocol with versioning and correlation IDs.
Experiment with segment-based log storage and crash recovery.
| anas727189/message-broker-system | aegrail/aegrail-engine | anfernee/k8s-ipam-webhook | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | Go | Go | Go |
| Last pushed | — | — | 2019-04-11 |
| Maintenance | — | — | Dormant |
| Setup difficulty | moderate | hard | hard |
| Complexity | 3/5 | 5/5 | 4/5 |
| Audience | developer | ops devops | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires running the broker, producer, and consumer as separate programs from source.
Message Broker System is an educational implementation of a Kafka-inspired message broker written in Go. Apache Kafka is a widely used system for passing data reliably between software services at scale, producers write messages in, consumers read them out, and the data is stored on disk so it can be replayed or read by multiple consumers independently. This project reimplements the core ideas in a deliberately compact form to make them easier to study. The system consists of three programs: a server (the broker), a producer client that sends messages, and a consumer client that reads them. The broker listens on a TCP port and appends incoming messages to an on-disk log file. Every message gets an offset, a number identifying its position in the log, which consumers use to track where they left off. Consumer group progress is persisted on disk, so a consumer that restarts resumes from where it stopped rather than starting over. Log storage is segment-based: the broker splits the log into multiple files as it grows rather than keeping one infinitely large file. Each segment has a paired index file for faster offset lookups. On startup, the broker discovers all existing segments and recovers its state from them, making it resilient to crashes. The binary protocol includes versioning and correlation IDs so requests and responses can be matched. Concurrent access is handled with read-write mutex locking. The project intentionally excludes Kafka features like topics, partitions, replication, and compression to keep the implementation focused on the storage and consumption fundamentals. The full README is longer than what was provided.
Message Broker System is a compact Go implementation of Kafka-style ideas, a broker plus producer and consumer clients, built for learning how message brokers actually work.
Mainly Go. The stack also includes Go, TCP.
License terms are not stated in the provided text.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.