Skip to main content

🍃 TinyMQ — The Featherweight Fortress

Version: 2.0.0 | License: GPL v3 | Language: Go (pure stdlib)

TinyMQ is a message broker built from scratch in pure Go, with zero external dependencies, designed for developers who need reliable, enterprise-grade async messaging without the operational overhead of Kafka or RabbitMQ.


The Zero-Bloat Philosophy

Modern message brokers are engineering marvels — and they are massive overkill for most projects.

Setting up an Erlang runtime (RabbitMQ), managing JVMs and Zookeeper clusters (Kafka), or configuring 12 YAML files just to pass JSON messages between three microservices is not a productivity win — it's an operational tax.

TinyMQ was built on a single principle:

You shouldn't need a DevOps team to deploy a message queue.

This translates into hard technical constraints:

ConstraintValue
External dependencies0
Docker image size~13.12 MB (from scratch)
Docker Scout CVEs0
Config files required0
Setup time< 60 seconds

Why Not Kafka or RabbitMQ?

This is not a criticism of those tools — it's an honest assessment of fit.

RabbitMQ

  • Requires an Erlang/OTP runtime
  • Complex cluster setup with dedicated nodes
  • High memory baseline even at idle
  • AMQP protocol adds client complexity

Apache Kafka

  • Requires a JVM (or native binary 500MB+)
  • Previously required ZooKeeper; now requires KRaft
  • Designed for log streaming at scale, not simple task queues
  • Steep learning curve for operators

TinyMQ

  • Pure Go binary, compiles to a single static executable
  • No runtime dependencies — runs from Docker scratch
  • HTTP API works with curl, any language, any framework
  • Operational complexity: docker run -p 7800:7800 flez71/tinymq:latest

Who Is TinyMQ For?

TinyMQ is the right tool when:

  • ✅ You're building a homelab, side project, or MVP
  • ✅ You have limited server resources ($4/month VPS is enough)
  • ✅ You want zero-config deployment — no XML, no YAML, no DSL
  • ✅ You need disk persistence with WAL guarantees without Kafka overhead
  • ✅ You're integrating heterogeneous services (PHP, Go, Python, Node.js) via HTTP
  • ✅ You need enterprise patterns (DLQ, TTL, Broadcast, Webhooks) without enterprise complexity

TinyMQ is not the right tool when:

  • ❌ You need to process millions of events per second
  • ❌ You need multi-node distributed clustering with replication and consensus
  • ❌ You need Kafka-style topic partitioning and consumer groups

Core Feature Matrix

FeatureDescription
WAL PersistenceAppend-only .log files per topic, auto-compaction on boot
Dead Letter QueuesAuto-isolation of poison-pill messages after 3 retries
Time-Based RoutingNative ?delay=10s and ?ttl=5m support
Push ConsumersWebhook-based fire-and-forget delivery to external URLs
BatchingExtract N messages per call with ?limit=N
BroadcastFan-out to all waiting consumers simultaneously
Interactive DashboardEmbedded HTML/JS UI at /dashboard
Native CLItmq binary with status, pub, sub, peek, tail
Go SDKOfficial client with long-polling and exponential backoff
OOM Protection2MB payload cap + 100k message RAM backpressure

Architecture Overview

The broker maintains messages in RAM for fast reads and simultaneously writes to a WAL log file for durability. On restart, the log is replayed and compacted automatically.


Next Steps