ZMQ Notifications
tidecoind can publish block and transaction notifications over ZeroMQ. ZMQ is
useful for exchanges, explorers, indexers, and monitoring services that should
react to new events without polling RPC constantly.
This page summarizes ../tidecoin/doc/zmq.md.
Build and Enable
ZeroMQ support must be built in:
cmake -B build -DWITH_ZMQ=ONThen enable topics in tidecoin.conf or on the command line:
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
zmqpubsequence=tcp://127.0.0.1:28334Topics
| Option | Topic | Body |
|---|---|---|
-zmqpubrawtx=<address> | rawtx | Serialized transaction |
-zmqpubhashtx=<address> | hashtx | Reversed 32-byte transaction hash |
-zmqpubrawblock=<address> | rawblock | Serialized block |
-zmqpubhashblock=<address> | hashblock | Reversed 32-byte block hash |
-zmqpubsequence=<address> | sequence | Block connect/disconnect and mempool add/remove events |
Every message has three parts:
topic | body | 4-byte little-endian sequence numberUse the sequence number to detect missed notifications.
Sequence Topic Events
| Event marker | Meaning |
|---|---|
C | Block connected |
D | Block disconnected |
A | Transaction added to mempool |
R | Transaction removed from mempool for a non-block reason |
For block topics, reorganizations require the subscriber to query the node and walk from its last known block to the new tip.
High Water Mark
Each notification type supports an outbound high-water-mark option:
zmqpubrawtxhwm=10000
zmqpubrawblockhwm=10000Tune HWM values for indexers and exchanges that may briefly fall behind. ZMQ can drop messages under pressure; subscribers must detect gaps and repair from RPC.
Security
ZMQ has no authentication or authorization at the Tidecoin topic layer. Bind it to localhost or a trusted network only. Treat all received data as untrusted until validated through your node or indexer.
See also: REST API, Node & Operations / REST and ZMQ, Monitoring Integration.