File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1162,9 +1162,11 @@ private CompletableFuture<? extends Subscription> getNonDurableSubscription(Stri
11621162 if (ledgerId >= 0 && entryId >= 0
11631163 && msgId instanceof BatchMessageIdImpl
11641164 && (msgId .getBatchIndex () >= 0 || resetIncludeHead )) {
1165+ // When resetIncludeHead is true, we need to take one step back on the previous message,
1166+ // to ensure the read position starts with startMessageId
1167+
11651168 // When the start message is relative to a batch, we need to take one step back on the previous
1166- // message,
1167- // because the "batch" might not have been consumed in its entirety.
1169+ // message, because the "batch" might not have been consumed in its entirety.
11681170 // The client will then be able to discard the first messages if needed.
11691171 entryId = msgId .getEntryId () - 1 ;
11701172 }
You can’t perform that action at this time.
0 commit comments