BewareMyPower commented on code in PR #19031:
URL: https://github.com/apache/pulsar/pull/19031#discussion_r1059303705
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -204,6 +208,10 @@
private final AtomicReference<ClientCnx>
clientCnxUsedForConsumerRegistration = new AtomicReference<>();
private final List<Throwable> previousExceptions = new
CopyOnWriteArrayList<Throwable>();
+ // Key is the ledger id and the entry id, entry is the acker that
represents which single messages are acknowledged
+ private final ConcurrentNavigableMap<Pair<Long, Long>, BatchMessageAcker>
batchMessageToAcker =
Review Comment:
@codelipenghui The key point is about how to use the deserialized batch
message id. IMO, when you use message id from the deserialization, before
processing them completely, you should not do something else.
1. Get some message IDs
2. Store them in somewhere else
3. Load them and process them
Just like the example here: Just like the example here:
https://github.com/apache/pulsar/pull/19031#discussion_r1059282261, the only
difference is that message IDs are stored in memory.
Your example works well because after the seek operation, you didn't use the
previous message IDs. Instead, you used the new message IDs, though they
represent the same positions with the previous message IDs.
--
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]