poorbarcode commented on code in PR #21052:
URL: https://github.com/apache/pulsar/pull/21052#discussion_r1303726145


##########
pip/pip-296.md:
##########
@@ -0,0 +1,100 @@
+# Background knowledge
+A consumer is a process that attaches to a topic via a subscription and then 
receives messages. The reader interface for Pulsar enables applications to 
manually manage cursors. More knowledge of the Reader and Consumer interface 
can be found in the [Pulsar Client 
doc](https://pulsar.apache.org/docs/next/concepts-clients/#reader).
+
+# Motivation
+
+Add the `getLastMessageIds` API for Reader.
+
+It can be used in the following case:
+**Message Tracing and Recovery:**
+In specific scenarios, applications might want to continue consuming from 
where they left off instead of starting from the beginning. Using the 
`getLastMessageIds` method, applications can retrieve the list of IDs for the 
last messages consumed in the previous session. These IDs can then be used 
during a restart to locate the starting position for consumption.
+
+**Troubleshooting and Analysis:**
+When a reader encounters issues, inspecting the list of IDs for messages 
already consumed can help determine the last position the reader has reached. 
This aids in troubleshooting and resolving problems.

Review Comment:
   Maybe `hasMessageAvailable` is helpful for this case?



##########
pip/pip-296.md:
##########
@@ -0,0 +1,100 @@
+# Background knowledge
+A consumer is a process that attaches to a topic via a subscription and then 
receives messages. The reader interface for Pulsar enables applications to 
manually manage cursors. More knowledge of the Reader and Consumer interface 
can be found in the [Pulsar Client 
doc](https://pulsar.apache.org/docs/next/concepts-clients/#reader).
+
+# Motivation
+
+Add the `getLastMessageIds` API for Reader.
+
+It can be used in the following case:
+**Message Tracing and Recovery:**
+In specific scenarios, applications might want to continue consuming from 
where they left off instead of starting from the beginning. Using the 
`getLastMessageIds` method, applications can retrieve the list of IDs for the 
last messages consumed in the previous session. These IDs can then be used 
during a restart to locate the starting position for consumption.

Review Comment:
   Could you explain how do you use `getLastMessageIds` to get the last 
messages consumed in the previous session?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to