Skip to main content
Version: Next


Loads bytes from and saves bytes to ZeroMQ messages.


zmq [-l|--listen] [-c|--connect] [-m|--monitor] [<endpoint>]


The zmq loader processes the bytes in a ZeroMQ message received by a SUB socket. The zmq saver sends bytes as a ZeroMQ message via a PUB socket.

Indpendent of the socket type, the zmq connector supports specfiying the direction of connection establishment with --listen and --connect. This can be helpful to work around firewall restrictions and fit into broader set of existing ZeroMQ applications.

With the --monitor option, you can activate message buffering for TCP sockets that hold off sending messages until at least one remote peer has connected. This can be helpful when you want to delay publishing until you have one connected subscriber, e.g., when the publisher spawns before any subscriber exists.

The default format for the zmq connector is json.

-f|--filter <prefix> (Loader)

Installs a filter for the ZeroMQ SUB socket at the source. Filting in ZeroMQ means performing a prefix-match on the raw bytes of the entire message.

Defaults to the empty string, which is equivalent to no filtering.


Bind to the ZeroMQ socket.

By default, the loader connects and the saver listens.


Connect to the ZeroMQ socket.

By default, the loader connects and the saver listens.


Monitors a 0mq socket over TCP until the remote side establishes a connection.


The endpoint for connecting to or listening on a ZeroMQ socket.

Defaults to tcp://


Publish query results to a ZeroMQ socket:

export | where x == 42 | to zmq

Publish the list of TQL operators as CSV, also connect instead of listening on the ZeroMQ socket:

show operators | to zmq -c write csv

Interpret ZeroMQ messages as JSON:

from zmq read json

You could drop read json above since json is the default format for zmq.