Skip to main content

🍃 TinyMQ — The Featherweight Fortress

Version: Checking version... | 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, RabbitMQ, or NATS JetStream.


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 MB (from scratch)
Docker Scout CVEs0
Config files required0
Setup time< 60 seconds

Why Not Kafka, RabbitMQ, or NATS?

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+)
  • Designed for log streaming at scale, not simple task queues
  • Steep learning curve for operators

NATS JetStream

  • While incredibly fast, setting up JetStream for persistence requires managing streams, subjects, and consumer configuration which can be overly complex for simple use cases.

TinyMQ

  • Pure Go binary, compiles to a single static executable
  • No runtime dependencies — runs from Docker scratch
  • Multi-protocol out of the box (HTTP, MQTT, NATS, WS, SSE)
  • Operational complexity: docker run -p 7800:7800 ghcr.io/x-name15/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 via HTTP, MQTT, or NATS
  • ✅ 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 (TinyMQ tops out in the low tens of thousands per node)
  • ❌ You need Kafka-style partitioned topic logs for event sourcing

Core Feature Matrix

FeatureDescription
WAL PersistenceAppend-only .log files per topic, auto-compaction on boot
Clustering (P2P)Masterless, quorum-based replication without ZooKeeper or Raft libs
Multi-Protocol GatewayNative HTTP REST, MQTT v3.1.1, NATS, WebSockets, and SSE
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 (with HMAC signing)
Consumer GroupsVirtual topic binding for Pub/Sub patterns
Priority QueuesEnqueue with High/Normal/Low priorities
IdempotencyPrevent duplicate processing via Idempotency-Key or payload SHA256
Broadcast & BatchingFan-out to all waiting consumers, or extract N messages at once
Native K8s SupportBuilt-in identity resolution for StatefulSets
OOM Protection2MB payload cap + 100k message RAM backpressure + Rate Limiting

Architecture Overview

TinyMQ seamlessly routes messages across 5 native transports, unified by a core Write-Ahead Log.


Next Steps