Uh oh!
There was an error while loading. Please reload this page.
pubsub: reject expired and duplicate messages - #3743
Conversation
| if (ackHandler.totalExpiration.isBefore(now())) { | ||
| // Message expired while waiting. We don't extend these messages anymore, | ||
| // so it was probably sent to someone else. Don't work on it. | ||
| // Don't nack it either, because we'd be nacking someone else's message. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| // forget removes from pendingMessages; this is OK, concurrent maps can | ||
| // handle concurrent iterations and modifications. | ||
| entry.getValue().forget(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
csainty
commented
Sep 27, 2018
Generally like it, nice clean approach 👍 Won't handle a finalSubscribersubscriber = Subscriber.newBuilder(subscriptionName, (msg, ack) -> {
// do something
})
.setMaxAckExtensionPeriod(Duration.ZERO)
.build(); |
pongad
commented
Sep 27, 2018
That's right. This won't handle the case where max ack extension is zero. I'm a little concerned by this; this essentially changes the behavior from "we won't extend these" to "we'll never work on these". I'll make a small fix for this. |
csainty
commented
Sep 28, 2018
👍 I think this will fix #3383 and #2465 |
pongad
commented
Sep 28, 2018
Don't merge this yet. Someone from pubsub should take a look. |
| @Override | ||
| public void run() { | ||
| try { | ||
| if (ackHandler.totalExpiration.plusSeconds(messageDeadlineSeconds.get()).isBefore(now())) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…#3743) Fixes a typo in two image references on templates.
🤖 I have created a release *beep* *boop* --- <details><summary>2.56.0</summary> ## [2.56.0](googleapis/sdk-platform-java@v2.55.1...v2.56.0) (2025-04-18) ### Features * Selective gapic generation phase II ([#3730](googleapis/sdk-platform-java#3730)) ([d4bafa0](googleapis/sdk-platform-java@d4bafa0)) ### Bug Fixes * **hermetic-build:** use correct image name in templated graalvm jobs ([#3743](googleapis/sdk-platform-java#3743)) ([c71223d](googleapis/sdk-platform-java@c71223d)) * plumb mtls endpoint to TransportChannelProvider ([#3673](googleapis/sdk-platform-java#3673)) ([d7daf89](googleapis/sdk-platform-java@d7daf89)) ### Dependencies * add opentelemetry gcp-resources to shared deps ([#3722](googleapis/sdk-platform-java#3722)) ([4b94c7d](googleapis/sdk-platform-java@4b94c7d)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* pubsub: reject expired and duplicate messages * add some lag time before rejecting expired messages
* pubsub: reject expired and duplicate messages * add some lag time before rejecting expired messages
CC @csainty
This should let us clear through backlogs more quickly.