Skip to content

Commit

Permalink
pubsub: remove TODO (#3845)
Browse files Browse the repository at this point in the history
the existing behavior is already correct; added comment explaining why
  • Loading branch information
pongad authored Oct 24, 2018
1 parent 0e1bc68 commit 9745d90
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,8 @@ public void processReceivedMessages(List<ReceivedMessage> 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);
Expand Down

0 comments on commit 9745d90

Please sign in to comment.