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

queue.timeout doesn't seem to work in AWS #3354

Closed
tsuf239 opened this issue Jul 11, 2023 · 3 comments
Closed

queue.timeout doesn't seem to work in AWS #3354

tsuf239 opened this issue Jul 11, 2023 · 3 comments
Labels
🐛 bug Something isn't working 🎨 sdk SDK

Comments

@tsuf239
Copy link
Collaborator

tsuf239 commented Jul 11, 2023

I tried this:

Setting up a queue with a timeout,
inserting 2 messages that exceeded the timeout,
check what is the approxSize

This happened:

The approxSize was different than 2

I expected this:

Since timed-out messages should return to the queue the approxSize should be 2.

Is there a workaround?

No response

Component

SDK

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Anything else?

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@tsuf239 tsuf239 added the 🐛 bug Something isn't working label Jul 11, 2023
@staycoolcall911 staycoolcall911 added 🎨 sdk SDK good first issue Good for newcomers labels Jul 11, 2023
mergify bot pushed a commit that referenced this issue Jul 12, 2023
## Description
Finally closes #2114 !!
1. handled tests: 
* hidden: api/ delete, patch, option, get, put, post - #3342
* hidden: bucket/events - #2724
* hidden: queue/timeout - #3354 
* fixed: counter/dec - there was a bug working with both key and initial key different than 0
* fixed: function/memory_and_env- adjusted test
* fixed: function/timeout- adjusted test
* fixed- table/add_row - the key wasn't saved in the object when adding a key on preflight on sim, fixed and adjusted test
* fixed - website/website - adjusted test
* fixed - util/env- adjusted test, since utils.env is working, it is just that the meta comments aren't followed when using the cli and not hangar

2. Run build to generate new snapshots
3. edited the compatibility matrix - leftover tests detected: #3358
 
## Checklist

- [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [x] Description explains motivation and solution
- [x] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://www.winglang.io/terms-and-policies/contribution-license.html)*.
@staycoolcall911 staycoolcall911 removed the good first issue Good for newcomers label Jul 20, 2023
@revitalbarletz
Copy link
Collaborator

@ekeren I am not sure it is the timeout issue, could be that approx size is not returning the accurate size.

@tsuf239
Copy link
Collaborator Author

tsuf239 commented Aug 21, 2023

it could indeed be the approx size, (as it takes up to 1 minute to be updated) https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html

@tsuf239 tsuf239 closed this as completed Aug 22, 2023
@marciocadev
Copy link
Collaborator

The approxSize on AWS only filters ApproximateNumberOfMessages, but this should not be the only filter.

  • ApproximateNumberOfMessages: Returns the approximate number of messages available for retrieval from the queue.

  • ApproximateNumberOfMessagesDelayed: Returns the approximate number of messages in the queue that are delayed and not available for reading immediately. This can happen when the queue is configured as a delay queue or when a message has been sent with a delay parameter.

  • ApproximateNumberOfMessagesNotVisible: Returns the approximate number of messages that are in flight. Messages are considered to be in flight if they have been sent to a client but have not yet been deleted or have not yet reached the end of their visibility window.

However, the ApproximateNumberOfMessagesDelayed, ApproximateNumberOfMessagesNotVisible, and ApproximateNumberOfMessagesVisible metrics may not achieve consistency until at least 1 minute after the producers stop sending messages. This period is required for the queue metadata to reach eventual consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🎨 sdk SDK
Projects
Archived in project
Development

No branches or pull requests

4 participants