In my previous blog that introduces Apache BookKeeper, it mentions that Apache Pulsar maintains a cursor ledger for each subscription in Apache BookKeeper. After a consumer has processed a message with an acknowledgment sent to the broker and the broker has received it, the broker updates the cursor ledger accordingly. In this blog, let’s take a closer look at the cursor, how it works, and some concepts related to it.
What Are Cursors
Ensuring messages can be consumed successfully represents a key part of any distributed message system. In exceptions, such as machine failures on either the client side or server side, a message system featuring strong fault tolerance makes sure that no messages are lost or reconsumed. To provide such capability, message systems need a precise tracking mechanism for message consumption and acknowledgment. Apache Pulsar uses cursors for that purpose.