pyzmq (ZeroMQ Python)

Python bindings for ZeroMQ, a high-performance asynchronous messaging library. ZeroMQ provides patterns (pub-sub, push-pull, req-rep, router-dealer) for building distributed systems without a message broker. Used in Jupyter kernels, agent-to-agent communication, and high-throughput data pipelines. Supports TCP, IPC (Unix sockets), and in-process transport.

Evaluated Mar 06, 2026 (0d ago) v25+
Homepage ↗ Repo ↗ Developer Tools zeromq zmq messaging pub-sub push-pull req-rep ipc networking python jupyter
⚙ Agent Friendliness
59
/ 100
Can an agent use this?
🔒 Security
72
/ 100
Is it safe for agents?
⚡ Reliability
86
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
80
Error Messages
72
Auth Simplicity
75
Rate Limits
90

🔒 Security

TLS Enforcement
72
Auth Strength
70
Scope Granularity
65
Dep. Hygiene
82
Secret Handling
75

No encryption by default — all messages in plaintext. CurveZMQ provides strong encryption but requires manual key management. Default deployments should be treated as internal-only.

⚡ Reliability

Uptime/SLA
100
Version Stability
85
Breaking Changes
82
Error Recovery
78
AF Security Reliability

Best When

You need ultra-low-latency messaging between processes or machines with flexible patterns (pub-sub, pipeline, req-rep) and no broker dependency.

Avoid When

You need message persistence, acknowledgment guarantees, or managed cloud messaging — RabbitMQ, Kafka, or NATS are better for those requirements.

Use Cases

  • Build high-throughput pub-sub agent communication where agents subscribe to topic streams without a central broker
  • Implement pipeline patterns (PUSH/PULL) for distributing agent work across multiple workers without Kafka or RabbitMQ overhead
  • Create inter-process communication between agent components on the same host using Unix socket IPC transport with near-zero overhead
  • Build request-reply patterns for agent service calls with built-in load balancing across worker pool via ROUTER/DEALER sockets
  • Enable Jupyter-style kernel communication where agent orchestrators communicate with code execution kernels over ZMQ

Not For

  • Message persistence and durability — ZeroMQ is a transport layer with no message storage; use RabbitMQ or Kafka for durable messaging
  • Teams unfamiliar with socket programming — ZeroMQ requires understanding socket patterns and connection semantics; higher-level messaging solutions are simpler
  • Cloud-native microservices — gRPC or HTTP/2 have better tooling for service mesh, observability, and platform integration

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

No built-in auth in base ZeroMQ. CurveZMQ provides elliptic-curve encryption and authentication. PLAIN auth available but sends credentials in plaintext. Production use should enable CurveZMQ.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

ZeroMQ and pyzmq are open source and free.

Agent Metadata

Pagination
none
Idempotent
Partial
Retry Guidance
Not documented

Known Gotchas

  • PUB/SUB slow joiner syndrome — subscribers miss messages published before the subscription is established; add a sleep(0.1) after connect() or use a synchronization pattern
  • ZMQ sockets are NOT thread-safe — never share a socket across threads; create per-thread sockets and use PAIR or PUSH/PULL for inter-thread communication
  • recv() is blocking by default — use NOBLOCK flag or poller (zmq.Poller) to avoid blocking agent event loops
  • Socket HWM (High Water Mark) drops messages silently when queues are full — set appropriate HWM or handle zmq.EAGAIN to detect dropped messages
  • Closing sockets during context termination can hang if messages are in-flight — use linger=0 on socket close or ctx.term() may block indefinitely
  • IPC transport on Windows uses TCP loopback (no Unix sockets) — 'ipc://' addresses work on Linux/macOS only; use 'tcp://127.0.0.1:' for cross-platform IPC

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for pyzmq (ZeroMQ Python).

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered