HARMONY-2364: Make sure as work item updates are actively being worked SQS messages are not redelivered#917
Merged
Merged
Conversation
…d the queue visibility does not timeout and try to redeliver the message to be processed again.
flamingbear
approved these changes
Jun 4, 2026
Member
flamingbear
left a comment
There was a problem hiding this comment.
This code looks clean and the tests look comprehensive. While I'm still a bit uncertain how the bug was actually showing up -- I understand the message getting redelivered before it could complete and then not being able to be deleted -- I did see the previous infrastructure change to shuttle items into a DLQ after 5 retries, and now I am seeing the logging for "Extending message visibility" (that's a long way to say it looks good to me, but you might want a second opinion)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira Issue ID
HARMONY-2364
Description
Make sure as work item updates are actively being worked SQS messages are not redelivered. The root cause of the bug for HARMONY-2364 is that the work item updates for the Geoloco work items in the request took over 100 seconds to process and the messages were being redelivered every 30 seconds because the message had not been deleted from the queue. When the message is redelivered because of the design of SQS the original worker is not able to delete the message from the queue (the only valid receipt handle that can delete the message is the last worker that received the message).
With this change the worker will extend the visibility timeout every 30 seconds to prevent the message from being redelivered.
Local Test Steps
I built and pushed the work-updater image to sandbox and then tested in sandbox pointed against production using {root}/C1379758607-LAADS/ogc-api-coverages/1.0.0/collections/all/coverage/rangeset?subset=lon(77.19259999%3A77.19260000999999)&subset=lat(28.54499999%3A28.545000010000003)&format=application%2Fx-hdf&maxResults=100&skipPreview=true
I verified the message was logged every 30 seconds:
I saw work items completed successfully in the workflow-ui and no messages were added to the dead letter queue.
PR Acceptance Checklist