explaingit

electricalgorithm/protomq

Analysis updated 2026-05-18

31ZigAudience · developerComplexity · 4/5Setup · moderate

TLDR

A tiny, fast MQTT message broker for IoT and edge devices, written in Zig, that swaps bulky JSON for compact Protobuf and enforces message schemas at the broker.

Mindmap

mindmap
  root((repo))
    What it does
      IoT message broker
      Protobuf encoding
      Schema enforcement
    Tech stack
      Zig
      MQTT
      Protobuf
    Use cases
      Sensor data streaming
      Bandwidth savings
      Edge computing
    Audience
      IoT developers
      Embedded engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Send sensor readings from thousands of IoT devices without wasting cellular bandwidth on verbose JSON

USE CASE 2

Reject malformed device data at the broker before it reaches any subscriber

USE CASE 3

Run a lightweight MQTT broker on edge hardware with no external dependencies

USE CASE 4

Let clients send plain JSON and have it auto-converted to Protobuf via the bundled CLI

What is it built with?

ZigMQTTProtobuf

How does it compare?

electricalgorithm/protomqromance-dev/speedboostatasoya/carbonara
Stars312719
LanguageZigZigZig
Setup difficultymoderatemoderateeasy
Complexity4/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

You must define schema files before clients can publish messages.

In plain English

ProtoMQ is a message broker built for Internet of Things devices and edge computing, designed to replace bulky JSON data with a compact binary format called Protobuf (Protocol Buffers). In IoT systems, thousands of small sensors constantly send readings, temperature, humidity, and so on. JSON is easy to read but wastes bandwidth. The same data in Protobuf can be about four times smaller, which matters when devices are on cellular connections and you're paying per megabyte. What makes ProtoMQ distinctive is that it enforces data structure at the broker level, the server in the middle that receives and distributes messages. You define what your messages must look like using schema files, and the broker rejects any message that doesn't match. This catches bad data before it reaches any subscriber. Clients that don't want to deal with binary encoding can send plain JSON and let the bundled command-line tool convert it to Protobuf automatically. The broker supports the standard MQTT messaging protocol, including wildcard topic routing and a built-in discovery system so clients can download schemas automatically. It is written entirely in Zig, runs with no external dependencies, uses about 2.6 MB of memory for 100 simultaneous connections, and handles over 200,000 messages per second on modern hardware.

Copy-paste prompts

Prompt 1
Show me how to define a Protobuf schema file and connect a client to ProtoMQ over MQTT
Prompt 2
Help me convert my IoT device's JSON payloads to Protobuf using ProtoMQ's command-line tool
Prompt 3
Explain how ProtoMQ's schema discovery system lets clients auto-download schemas
Prompt 4
Walk me through setting up wildcard topic routing in ProtoMQ

Frequently asked questions

What is protomq?

A tiny, fast MQTT message broker for IoT and edge devices, written in Zig, that swaps bulky JSON for compact Protobuf and enforces message schemas at the broker.

What language is protomq written in?

Mainly Zig. The stack also includes Zig, MQTT, Protobuf.

How hard is protomq to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is protomq for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.