
The little book of QueenMQ
Download the PDFFree to download. The same book is on this site, with the code in six languages.
This book is written by the authors of QueenMQ. In it, we have tried to explain in simple terms what QueenMQ does, and why. Read it from the first page to the last, offline, in an afternoon; come back to this site to look things up.
What is inside
| Chapter | What it covers |
|---|---|
| 1. Introduction | What QueenMQ is, why we built it (the story that went from a Postgres table to a log on disk replicated with Raft), and the model in four ideas: partitions, leases, transactions and a simple interface. |
| 2. Writing applications | Every feature of the client API, one at a time: a local broker, queues and their options, push, pop and consume, acks, retries and the dead-letter queue, transactions, KV, locks and timers, ephemeral queues and stream processing. |
| 3. Real applications | The common messaging patterns, one each, with a real case: work queue, publish/subscribe, request and reply, ordering and batching, workflows, windowed aggregation, rate limiting, last value, delayed messages, retries and dead letters, one worker at a time. |
| 4. Integrations | Kafka clients through the built-in Kafka port, an S3 bucket kept up to date by the sink, PostgreSQL tables read and written by the source and the sink, and the worker supervisor that runs Laravel workers. |
| 5. Manage clusters | The settings that matter most, a cluster with Docker and inside Kubernetes, the configuration for different needs, upgrades and monitoring, and what to do when something breaks. |
| 6. Architecture | How the broker works inside: one leader per tenant, the path of a write from the request to the disk, Raft, the memory state, the consumption engine, LMDB, and the files on disk down to their bytes. |
The book and this site
These docs follow the book, chapter by chapter, with the same drawings. The book shows its code in JavaScript; the site shows the same code in all six SDK languages. Every piece of code in both comes from programs that run it against QueenMQ and check the result.