Lanayx commented on a change in pull request #6345: [Java Reader Client] Start 
reader inside batch result in read first message in batch.
URL: https://github.com/apache/pulsar/pull/6345#discussion_r394666512
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
 ##########
 @@ -1520,7 +1536,10 @@ public void seek(long timestamp) throws 
PulsarClientException {
         cnx.sendRequestWithId(seek, requestId).thenRun(() -> {
             log.info("[{}][{}] Successfully reset subscription to message id 
{}", topic, subscription, messageId);
             acknowledgmentsGroupingTracker.flushAndClean();
-            lastDequeuedMessage = messageId;
+
+            seekMessageId = new BatchMessageIdImpl((MessageIdImpl) messageId);
+            duringSeek.set(true);
 
 Review comment:
   There is another issue with the same test with Batching enabled - as long as 
`lastDequeueMessage` is not reset, it stays on last `BatchMessageIdImpl` while 
`getLastMessageIdAsync` always returns `MessageIdImpl` so [this 
check](https://github.com/apache/pulsar/blob/branch-2.5/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L1603)
 returns false because types of messageIds are different

----------------------------------------------------------------
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

Reply via email to