THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Does Bitcoin Core ZMQ Guarantee Delivery of Every Event?

permalink THAMER
#bitcoin#bitcoin-core#event-delivery#zmq

No. Bitcoin Core ZMQ uses a publish-subscribe notification model. A subscriber can miss events while disconnected, during startup or when it cannot consume messages quickly enough. The publisher does not maintain a durable replay log for each subscriber.

Can a subscriber detect missing messages?

The multipart notification counter can reveal gaps in a stream. Handle wraparound and publisher restarts, and remember that a gap before the first received notification cannot necessarily be detected from the counter alone.

How should a wallet recover?

Obtain a fresh state snapshot using RPC, reconcile the active chain and local mempool, and rebuild affected wallet records. Buffer incoming notifications during synchronization and handle duplicate events safely. Periodic reconciliation is useful even when no gap has been detected.

A notification is evidence of an event observed by a particular node, not proof that every peer saw the same event. Do not use notification delivery alone as a guarantee of payment settlement.

Primary references

Bitcoin Core ZMQ documentation: https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects