What is the use case of bitcoind ZeroMQ?

17

5

What is the use case of ZeroMQ implementation for bitcoind which will be merged into Bitcoin Core v0.12.0?

Block and Transaction Broadcasting With ZeroMQ https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md

Satoshi Nakanishi

Posted 2015-10-03T16:03:54.143

Reputation: 527

Answers

21

ZeroMQ is a publisher / subscriber messaging system. In the case of Bitcoin Core it is a socket which other applications can connect to and get notifications of new events in real time, without having to repeatedly ask the daemon if there are any new events. ZMQ support is useful for any systems interfacing with the network like miners and wallets, which can choose to subscribe either to just transaction notifications or block notifications as their situation requires. It covers a lot of the same use area as the prexisting walletnotify and blocknotify systems, but with significantly improved performance and ease of configuration. These older systems have the unfortunate side effect of spawning a new process for every notification, which tends to incapacitate the host if not used extremely carefully.

Anonymous

Posted 2015-10-03T16:03:54.143

Reputation: 10 054

1It currently (upcoming 0.12 release) does not support walletnotify-likes notifications. Only notifications for new blocks or transactions.Jonas Schnelli 2015-10-04T19:27:18.403

@JonasSchnelli I'll re-write that to be clearer, I meant you can emulate walletnotify by simply subscribing to all transactions and doing your own IsMine()-style filtering externally.Anonymous 2015-10-04T22:07:22.600