winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.06k stars 198 forks source link

Queue setConsumer function ignores timeout in QueueSetConsumerOptions #7096

Open jonparker opened 2 months ago

jonparker commented 2 months ago

I tried this:

Created an app with a queue:

let q = new cloud.Queue();
q.setConsumer(inflight myFunction, { timeout: duration.fromHours(1) });

And compiled to tf-aws target.

This happened:

The lambda for consuming messages from the queue is created with a default timeout of 29sec.

I expected this:

The lambda to have a timeout of 1hr.

Is there a workaround?

This is the workaround, however it means the Simulator doesn't load as it doesn't support queue timeouts:

let q = new cloud.Queue({ timeout: duration.fromHours(1) });

Anything else?

Discord thread with more details: https://discord.com/channels/1096077994994442281/1278607145243381782/1278607145243381782

Wing Version

0.83.6

Node.js Version

v20.15.0

Platform(s)

MacOS

Community Notes