codelipenghui commented on a change in pull request #6331: [Issue
2912][pulsar-admin] add get-message-by-id cmd into pulsar-admin
URL: https://github.com/apache/pulsar/pull/6331#discussion_r379778130
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java
##########
@@ -131,6 +131,22 @@ Entry getNthEntry(int n, IndividualDeletedEntries
deletedEntries)
void asyncGetNthEntry(int n, IndividualDeletedEntries deletedEntries,
ReadEntryCallback callback,
Object ctx);
+
+ /**
+ * Asynchronously get a message by its id.
+ *
+ * @param ledgerId
+ * ledger id
+ * @param entryId
+ * entry id
+ * @param deletedEntries
+ * skip individual deleted entries
+ * @param callback
+ * @param ctx
+ */
+ void asyncGetMessageById(long ledgerId, long entryId,
IndividualDeletedEntries deletedEntries,
Review comment:
According to what we discussed before, We don't need to specify a
subscription name for getting a message by ID. So I think we can get a message
from ManagedLedger directly by
https://github.com/apache/pulsar/blob/master/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L1494.
So that we don't need to create a one-time subscription.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services