Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changing visibility timeout for each call #242

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

danielle-tfh
Copy link
Contributor

Notes

  • deprecate extend enabled and update the visibility timeout for each receive instead
  • this saves SQS calls on each worker

@danielle-tfh danielle-tfh requested a review from a team as a code owner December 2, 2024 11:55
consumer.go Outdated
@@ -56,6 +55,7 @@ loop:
MaxNumberOfMessages: c.cfg.BatchSize,
WaitTimeSeconds: int32(5),
MessageAttributeNames: []string{"TraceID", "SpanID"},
VisibilityTimeout: c.cfg.VisibilityTimeout,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the scenario of client skipping to pass VisibilityTimeout, I think it will default to 0. I'm not sure what's gonna happen in that case - maybe message will be put back to the sqs directly after received?

I think it would be good to have a default value for it or setting c.cfg.VisibilityTimeout here only when it's bigger than 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

@danielle-tfh danielle-tfh merged commit 0df1c8f into main Dec 2, 2024
7 checks passed
@danielle-tfh danielle-tfh deleted the update-sqs-visibility-in-one-call branch December 2, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants