heinrichhartmann/zmqdump

dump zmq messages on a socket

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 42 minutes ago
Added to GitGenius on July 30th, 2026
Created on December 30th, 2013
Open Issues & Pull Requests: 1 (+0)
GitHub issues: Enabled
Number of forks: 2
Total Stargazers: 15 (+0)
Total Subscribers: 1 (+0)

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

zmqdump is a command-line utility written in Python that enables ZeroMQ socket communication to be accessed and manipulated through standard Unix shell interfaces. The tool bridges the gap between ZeroMQ messaging and shell scripting by allowing users to read messages from and write messages to ZeroMQ sockets using stdin and stdout, making ZeroMQ communication available to traditional Unix pipelines and shell scripts.

The utility supports four primary socket types: PUB, SUB, PUSH, and PULL, with plans to add support for PAIR, REQ, REP, ROUTER, and DEALER socket types in the future. These socket types cover the main messaging patterns in ZeroMQ, from publish-subscribe communication to task distribution via push-pull queues. The tool can operate in either connect mode, where it connects to an existing socket, or bind mode, where it creates and binds to a socket endpoint, providing flexibility for different network topologies.

zmqdump supports multiple transport protocols including inproc for in-process communication, ipc for inter-process communication, tcp for network communication, and pgm and epgm for multicast messaging. The endpoint specification follows ZeroMQ's standard format of transport://address, allowing users to specify the exact communication channel they need.

The default behavior of zmqdump is straightforward: all messages received on a socket are dumped to stdout, and all lines received on stdin are sent out as string messages. This simple input-output model makes it easy to integrate with existing Unix tools and shell scripts. The tool includes several options to fine-tune its behavior. The -d delay option addresses the slow joiner syndrome in ZeroMQ by allowing an initial delay in milliseconds before messages are sent, ensuring subscribers are ready to receive. The -s pattern option enables subscription filtering for SUB socket types, allowing users to subscribe to specific message patterns rather than all messages. The -hwm limit option sets a high water mark on the socket, with a default value of 1000, controlling the maximum number of messages that can be queued.

The repository demonstrates practical use cases that showcase zmqdump's versatility. These include capturing messages from a publisher to a file, distributing file contents or script output across a push socket, and piping received messages through standard Unix utilities like sed for transformation. The tool is particularly useful for network testing, where developers can easily inspect ZeroMQ traffic without writing custom code. It also serves as a simple ZeroMQ proxy mechanism and enables shell script-based ZeroMQ applications, allowing developers to prototype and test ZeroMQ systems using familiar shell scripting techniques.

zmqdump
by
heinrichhartmannheinrichhartmann/zmqdump

Repository Details

Fetching additional details & charts...