Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
summeriiii committed Oct 17, 2024
1 parent 7fa9324 commit f604ded
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions pip/pip-386.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,6 @@ Add resetIncludeHead in CommandSubscribe to implement startMessageIdInclusive, a
- PersistTopic#getNonDurableSubscription add the judge condition `(msgId.getBatchIndex() >= 0 || resetIncludeHead)`, entryId - 1 will execute **when msg is batch or the resetIncludeHead is true.**


```java
if (ledgerId >= 0 && entryId >= 0
&& msgId instanceof BatchMessageIdImpl
&& (msgId.getBatchIndex() >= 0 || resetIncludeHead)) {
// When the start message is relative to a batch, we need to take one step back on the previous
// message,
// because the "batch" might not have been consumed in its entirety.
// The client will then be able to discard the first messages if needed.
entryId = msgId.getEntryId() - 1;
}
```


### Binary protocol

Add `reset_include_head` field to the `CommandSubscribe`.
Expand Down Expand Up @@ -114,5 +101,5 @@ message CommandSubscribe {

# Links

* Mailing List discussion thread:
* Mailing List voting thread:
* Mailing List discussion thread: https://lists.apache.org/thread/tvk9nl47gqtbx2nrdzknm4v8sm67ywp9
* Mailing List voting thread: https://lists.apache.org/thread/x5xknyyr0pyrhwoslbxbbcj0o1xyyyp6

0 comments on commit f604ded

Please sign in to comment.