Skip to content

Commit 9745d90

Browse files
authored
pubsub: remove TODO (#3845)
the existing behavior is already correct; added comment explaining why
1 parent 0e1bc68 commit 9745d90

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,8 @@ public void processReceivedMessages(List<ReceivedMessage> messages, Runnable don
349349
// putIfAbsent puts ackHandler if ackID isn't previously mapped, then return the previously-mapped element.
350350
// If the previous element is not null, we already have the message and the new one is definitely a duplicate.
351351
// Don't nack this, because that'd also nack the one we already have in queue.
352-
353-
// TODO(pongad): We could update the total expiration time, but I'm not 100% sure how that plays with
354-
// various resources. Think about this more.
352+
// Don't update the existing one's total expiration either. If the user "loses" the message, we want to eventually
353+
// totally expire so that pubsub service sends us the message again.
355354
continue;
356355
}
357356
outstandingBatch.addMessage(message, ackHandler);

0 commit comments

Comments
 (0)