Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@
* while (running) {
* Message msg = queue.retrieve();
* synchronized (ctx.getCheckpointLock()) {
* ctx.collect(msg.getMessageData());
* addId(msg.getMessageId());
* if (addId(msg.getMessageId())) {
* ctx.collect(msg.getMessageData());
* }
* }
* }
* }
Expand Down Expand Up @@ -187,7 +188,8 @@ public void close() throws Exception {
protected abstract void acknowledgeIDs(long checkpointId, Set<UId> uIds);

/**
* Adds an ID to be stored with the current checkpoint.
* Adds an ID to be stored with the current checkpoint. In order to achieve exactly-once guarantees, implementing
* classes should only emit records with IDs for which this method return true.
* @param uid The ID to add.
* @return True if the id has not been processed previously.
*/
Expand Down