Skip to content

Commit

Permalink
Clarify server side filtering sample and align with docs (#300)
Browse files Browse the repository at this point in the history
* Encourage developers to use commit position as checkpoint to align with docs

---------

Co-authored-by: William Chong <[email protected]>
  • Loading branch information
stktung and w1am authored Feb 17, 2025
1 parent 34067b4 commit 6ad57e6
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ private static void checkpointCallback(EventStoreDBClient client) {
new Checkpointer() {
@Override
public CompletableFuture<Void> onCheckpoint(Subscription subscription, Position position) {
System.out.println("checkpoint taken at {p.PreparePosition}");
// Save commit position to a persistent store as a checkpoint
System.out.println("checkpoint taken at {position.getCommitUnsigned}");
return CompletableFuture.completedFuture(null);
}
})
Expand Down Expand Up @@ -176,7 +177,8 @@ private static void CheckpointCallbackWithInterval(EventStoreDBClient client) {
new Checkpointer() {
@Override
public CompletableFuture<Void> onCheckpoint(Subscription subscription, Position position) {
System.out.println("checkpoint taken at {p.PreparePosition}");
// Save commit position to a persistent store as a checkpoint
System.out.println("checkpoint taken at {position.getCommitUnsigned}");
return CompletableFuture.completedFuture(null);
}
},
Expand Down

0 comments on commit 6ad57e6

Please sign in to comment.