From 9745d901609f9ca4333ab363e4ea67bc3448a5e9 Mon Sep 17 00:00:00 2001 From: Michael Darakananda Date: Tue, 23 Oct 2018 18:45:17 -0700 Subject: [PATCH] pubsub: remove TODO (#3845) the existing behavior is already correct; added comment explaining why --- .../java/com/google/cloud/pubsub/v1/MessageDispatcher.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java b/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java index 79aa6b71a94a..cda1eefea4cd 100644 --- a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java +++ b/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java @@ -349,9 +349,8 @@ public void processReceivedMessages(List messages, Runnable don // putIfAbsent puts ackHandler if ackID isn't previously mapped, then return the previously-mapped element. // If the previous element is not null, we already have the message and the new one is definitely a duplicate. // Don't nack this, because that'd also nack the one we already have in queue. - - // TODO(pongad): We could update the total expiration time, but I'm not 100% sure how that plays with - // various resources. Think about this more. + // Don't update the existing one's total expiration either. If the user "loses" the message, we want to eventually + // totally expire so that pubsub service sends us the message again. continue; } outstandingBatch.addMessage(message, ackHandler);