BewareMyPower commented on code in PR #20040:
URL: https://github.com/apache/pulsar/pull/20040#discussion_r1161609338
##########
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Consumer.java:
##########
@@ -536,19 +537,38 @@ CompletableFuture<Void>
reconsumeLaterCumulativeAsync(Message<?> message,
CompletableFuture<Void> seekAsync(long timestamp);
/**
- * Get the last message id available for consume.
+ * Get the last message id of the topic subscribed.
*
- * @return the last message id.
+ * @return the last message id of the topic subscribed
+ * @throws PulsarClientException if multiple topics or partitioned topics
are subscribed or failed because of a
+ * network issue
+ * NOTE: Use {@link Consumer#getLastMessageIds()} instead.
*/
+ @Deprecated
MessageId getLastMessageId() throws PulsarClientException;
/**
- * Get the last message id available for consume.
- *
- * @return a future that can be used to track the completion of the
operation.
+ * The asynchronous version of {@link Consumer#getLastMessageId()}.
+ * NOTE: Use {@link Consumer#getLastMessageIdsAsync()} instead.
*/
+ @Deprecated
CompletableFuture<MessageId> getLastMessageIdAsync();
+ /**
+ * Get all the last message id of the topics the consumer subscribed.
+ *
+ * @return the list of TopicMessageId instances of all the topics that the
consumer subscribed
+ * @throws PulsarClientException if failed to get last message id.
+ * @apiNote It's guaranteed that the owner topic of each TopicMessageId in
the returned list is different from owner
+ * topics of other TopicMessageId instances
+ */
+ List<TopicMessageId> getLastMessageIds() throws PulsarClientException;
Review Comment:
Yeah, I will update it after this PR is merged. Because when the proposal
was approved, the method name is not same as it is in this PR. I think we need
to let reviewers know the change since the time point when PIP passed the vote.
--
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]