Skip to content

Commit

Permalink
Clarify initial subscription positioning (apache#4126)
Browse files Browse the repository at this point in the history
  • Loading branch information
grantwwu authored and merlimat committed Apr 25, 2019
1 parent 4e84d5b commit 25662b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site2/docs/concepts-clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Whenever the TCP connection breaks, the client will immediately re-initiate this

## Reader interface

In Pulsar, the "standard" [consumer interface](concepts-messaging.md#consumers) involves using consumers to listen on [topics](reference-terminology.md#topic), process incoming messages, and finally acknowledge those messages when they've been processed. Whenever a consumer connects to a topic, it automatically begins reading from the earliest un-acked message onward because the topic's cursor is automatically managed by Pulsar.
In Pulsar, the "standard" [consumer interface](concepts-messaging.md#consumers) involves using consumers to listen on [topics](reference-terminology.md#topic), process incoming messages, and finally acknowledge those messages when they've been processed. Whenever a new subscription is created, it is initially positioned at the end of the topic (by default), and consumers associated with that subscription will begin reading with the first message created afterwards. Whenever a consumer connects to a topic using a pre-existing subscription, it begins reading from the earliest message un-acked within that subscription. In summary, with the consumer interface, subscription cursors are automatically managed by Pulsar in response to [message acknowledgements](concepts-messaging.md#acknowledgement).

The **reader interface** for Pulsar enables applications to manually manage cursors. When you use a reader to connect to a topic---rather than a consumer---you need to specify *which* message the reader begins reading from when it connects to a topic. When connecting to a topic, the reader interface enables you to begin with:

Expand Down

0 comments on commit 25662b4

Please sign in to comment.