# Zeromq Routing

> zeromq, router, dealer, envelopes, brokers, peer-routing

- Skill: `lost-rob0t/zeromq-routing` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add lost-rob0t/zeromq-routing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lost-rob0t/zeromq-routing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: CC-BY-SA-3.0
- Author: lost-rob0t (https://skillmd.com/u/lost-rob0t)
- Updated: 2026-11-18
- Page: https://skillmd.com/skills/lost-rob0t/zeromq-routing

---


# ZeroMQ Routing

## Goal

Build addressed asynchronous routing without losing message-envelope,
readiness, or peer-lifecycle semantics.

## Workflow

1. Draw each hop and label which side binds and which connects.
2. Separate routing envelope from application body.
3. If a ROUTER is involved, define the routing identity lifecycle explicitly.
4. Route work only to peers that have declared readiness/capacity.
5. Keep broker logic minimal: routing, liveness, service lookup, and bounded
   state; business logic stays at endpoints.
6. For symmetric peer networks, consider the Guide's Harmony shape:
   one bound inbox plus one connected outbound socket per peer.
7. Require an initial HELLO/READY handshake before accepting stateful traffic.
8. Define what happens to unknown, stale, disconnected, and duplicated peer
   identities.
9. Verify with delayed connect, reconnect, endpoint reuse, peer churn, and
   unroutable-message tests.

## Rules

- Do not treat ROUTER identity as user identity or authorization.
- Avoid sending to a peer before the protocol says it is routable/ready.
- Prefer explicit failure for unroutable sends when the runtime supports it.
- Keep route metadata outside opaque application payloads when intermediaries
  need to forward without understanding the body.
- A blocked peer must not stall unrelated peers.
- Guide-era ROUTER-to-ROUTER limitations are historical; verify current
  routing-ID/probe features before asserting what a modern runtime can do.

