zmq Loads bytes from and saves bytes to ZeroMQ messages.
Synopsis zmq [-l|--listen] [-c|--connect] [-m|--monitor] [<endpoint>]
Description 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.
eyJ2ZXJzaW9uIjoiMSIsImVuY29kaW5nIjoiYnN0cmluZyIsImNvbXByZXNzZWQiOnRydWUsImVuY29kZWQiOiJ4nO1cXGtX2sxcdTAwMTb+7q/o4nwt6dwv/VZcdTAwMTErXHUwMDE121praz3nXa5IXCJGkFBcYnh5V//72Vx0SiY3SJBaznvEVS2TZGYy2c9+nj17Jn9vvXpVXHUwMDBi7oZu7e2rmnvbsfueM7Jvaq/D8qk7XHUwMDFhe/5cdTAwMDBcdTAwMGWR6PvYn4w60ZmXQTBcdTAwMWO/ffPGXHUwMDFlXHUwMDBlrfgqq+Nfz650++61O1xixnDuv+H7q1d/R7+NtvrewI3OjUrjloRS6dKP/iBqXHUwMDE1K0yYXHUwMDE2XHUwMDAyxWd441x1MDAxZGgqcFx1MDAxZDh8YffHbnwkLKpdXHUwMDFk9C8nzTt12Om2z7R3d/i9ecDjZi+8fv8ouOvP7snuXFxORkanxsHI77nfPSe4fFx1MDAxY1x1MDAwMqN8ft3Yh7uPr1x1MDAxYfmT7uXAXHUwMDFkh/eO56X+0O54wV1YhtC81Fx1MDAxZXSjOuKSW/hWx1palGHNqFxib1x1MDAxOVx1MDAxOTdcdTAwMWPWQFx1MDAxMbGIIEpSqYnEQvFU11x1MDAxYX7fXHUwMDFmhV37XHUwMDE3ij5x587tTq9cdTAwMGI9XHUwMDFjOPE5rnY77kV8zs3jXHJcdTAwMWJcdTAwMWS9dL3uZVx1MDAwMIVSWUwpzKWSimnJZNy0XHUwMDFiPVx1MDAwNYIwQZJgXHUwMDExX1x1MDAxYzY4bDmRMfxcdTAwMTWP/ci+dlvhJYNJv29cdTAwMGXfwHlcdTAwMTi+xIHz8EDTsKu4qsnQsWc2gIWmWmFGNMbxq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VcdTAwMGWPXHUwMDAyXHUwMDE4vbk+qU0992Y710rCT5jwjVx1MDAwMFx1MDAxY0LFjfTWr61f/1x1MDAwNWvg7FxiIn0=from ... to zmq PUB tcp://127.0.0.1:5555 zmq SUB tcp://127.0.0.1:5555 Saver Loader
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.
-l|--listen
Bind to the ZeroMQ socket.
By default, the loader connects and the saver listens.
-c|--connect
Connect to the ZeroMQ socket.
By default, the loader connects and the saver listens.
-m|--monitor
Monitors a 0mq socket over TCP until the remote side establishes a connection.
<endpoint>
The endpoint for connecting to or listening on a ZeroMQ socket.
Defaults to tcp://127.0.0.1:5555
.
Examples 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 1.2.3.4:56789 read json
You could drop read json
above since json
is the default format for zmq
.