-
Notifications
You must be signed in to change notification settings - Fork 190
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
QueueProps.timeout doesn't work on both sim and tf-aws #2401
Comments
Hey @tsuf239, I am the offender who touched the timeout and retention of queue lastly I think 😁 The default timeout of the function in simulator is 1 min, and if you specify 1s in the queue props it makes sense to me that an error is thrown, doesn't it? If you specify the timeout in your function less than queue's timeout it should work. But the question is, what should happen if the timeout of a consumer function is greater than the timeout of the queue itself? If so, to me there is something wrong in the application and throwing an error might be valid, what do you think? But we should make sure that the defaults match this criteria. |
There are two issues here actually: 2-The second part and the real bug here, is the timeout on the simulator- after passing the timeout, the message should go back to the Queue- see here: #165 |
1: I agree 🙏 2: Have you tried to set the timeout in the QueueProps to 61s in your example? I have the feeling that the message will get pushed back to the queue in that case Edit: I Looked up the code and got the issue again, the message is pushed back to the queue only if the consumer throws an error AND after the timeout which is triggered once after the error currently. If the consumer will timeout the message is lost, and if the timeout is very close it is ignored (as in your example). I can remember, that this was a raw workaround initially, since before the console crashed with a stack overflow when a consumer threw an error. You are right, the queue should simulate the timeout correctly, the timeout handling is not accurate now. |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Hi, This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Hi, This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
I tried this:
run this code (with both
wing test
andwing test -t tf-aws
):This happened:
the queue had 0 messages, the message didn't go back to the queue after the timeout
in aws:
I expected this:
to run without problems
Is there a workaround?
No response
Component
SDK
Wing Version
No response
Wing Console Version
No response
Node.js Version
No response
Platform(s)
No response
Anything else?
No response
Community Notes
The text was updated successfully, but these errors were encountered: