Skip to content

Commit a7c32aa

Browse files
authored
Clarify server side filtering sample and align with docs (#399)
* Added comment to clarify how check point should be taken * Refined comment
1 parent 4c46920 commit a7c32aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/test/src/samples/server-side-filtering.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ describe("[sample] server-side-filtering", () => {
9191
excludeSystemEvents({
9292
async checkpointReached(_subscription, position) {
9393
// The subscription will wait until the promise is resolved
94+
// Save commit position to a persistent store as a checkpoint
9495
await doSomethingAsync();
95-
console.log(`checkpoint taken at ${position.prepare}`);
96+
console.log(`checkpoint taken at ${position.commit}`);
9697
},
9798
});
9899
// endregion checkpoint
@@ -104,7 +105,8 @@ describe("[sample] server-side-filtering", () => {
104105
regex: "^[^$].*",
105106
checkpointInterval: 1000,
106107
checkpointReached(_subscription, position) {
107-
console.log(`checkpoint taken at ${position.prepare}`);
108+
// Save commit position to a persistent store as a checkpoint
109+
console.log(`checkpoint taken at ${position.commit}`);
108110
},
109111
});
110112
// endregion checkpoint-with-interval

0 commit comments

Comments
 (0)