Optional ReadonlyheartbeatSend a ZMTP heartbeat (PING) to the publisher every this many ms, an integer from 100 to 3,600,000, or 0 for none. qbitd's libzmq answers each one. Default 10,000.
Optional ReadonlyheartbeatDrop the connection when nothing, a PONG or a message, arrives within this
many ms of a heartbeat, an integer from 100 to 3,600,000; the subscriber
then yields a reconnect with reason: 'disconnected' and replaces the
socket. A publisher that stops answering without closing the connection
(qbitd hung or paused, its host gone) is so dropped within
heartbeatIntervalMs + heartbeatTimeoutMs, long before staleAfterMs, and
a new connection whose handshake has not completed within that time is
dropped too. So is a healthy publisher when the consumer falls behind:
libzmq stops reading a connection whose receive queue (1,000 messages) is
full, PONGs included. Default 20,000. Unused when heartbeatIntervalMs is
0, and then 0 is accepted too.
Optional ReadonlyheartbeatAsk the publisher to drop the connection when it hears nothing from this
subscriber for this many ms, so a subscriber that hangs does not hold
qbitd's queue: 0 for no limit, or an integer up to 6,553,500 that is at
least twice heartbeatIntervalMs once libzmq has rounded it down to a
multiple of 100. qbitd restarts the limit at each heartbeat, so one shorter
than the interval drops a healthy subscriber. Default 30,000, or twice the
interval rounded up to a multiple of 100 when that is longer. Unused when
heartbeatIntervalMs is 0, and then 0 (the default) or from 100.
Optional ReadonlymaxLargest inbound message part, in bytes. A larger one makes libzmq drop the
connection, which the subscriber reports as a reconnect. Default
2,065,536: qbit Core's 2,000,000-byte block limit plus 64 KiB, enough for
rawblock.
Optional ReadonlyreconnectWait before replacing a failed or disconnected socket. Default 1,000 ms.
Optional ReadonlysocketSocket source. Default: createZeromqSocket, loaded on first use.
It receives { maxMessageSize, ipv6, heartbeatIntervalMs, heartbeatTimeoutMs, heartbeatTtlMs, handshakeIntervalMs }, with ipv6
true when the url's host is an IPv6 address, and the tcpKeepalive
options that are set, and should apply them all, and turn off libzmq's own
reconnect as createZeromqSocket does. A factory can throw a
ZmqSetupError to end the iteration instead of being retried.
Optional Readonlystalehealth() reports stale once this long has passed since the last
message, on the monotonic clock (performance.now()). Pick it from the
topic's expected rate: blocks arrive about once a minute, so hashblock
alone needs several minutes. Default 600,000 ms.
Optional ReadonlytcpTCP keepalive on the connection: true to turn it on, false to turn it off.
Default: the operating system's (off on Linux). It detects a peer host
that is gone, not a process that hangs, and only on an idle connection,
which heartbeats keep busy: it is for a publisher that does not answer
heartbeats, with heartbeatIntervalMs: 0. A TypeError with an ipc:// url.
Optional ReadonlytcpUnanswered probes before the connection drops, an integer from 1 to 127.
Needs tcpKeepalive: true. Default: the OS's (9 on Linux).
Optional ReadonlytcpIdle seconds before the first keepalive probe, an integer from 1 to
32,767. Needs tcpKeepalive: true. Default: the OS's (7,200 on Linux).
Optional ReadonlytcpSeconds between keepalive probes, an integer from 1 to 32,767. Needs
tcpKeepalive: true. Default: the OS's (75 on Linux).
ReadonlytopicsTopics to subscribe to; each must be one qbitd publishes at url.
ReadonlyurlThe publisher address: tcp://<host>:<port>, with an IPv4 address, a
bracketed IPv6 address or a host name and a port from 1 to 65535 (for
example tcp://127.0.0.1:28332 or tcp://[::1]:28332), or
ipc://<path> (for example ipc:///run/qbitd/zmq.sock). The constructor
throws a TypeError for anything else.
The options of a QbitZmqSubscriber, checked at construction: a bad one is a
TypeErroror aRangeError.