question

RajeshR-0720 avatar image
0 Votes"
RajeshR-0720 asked RajeshR-0720 commented

Custom Visibility Timeout for Queue Nessage in Output Binding Context

When setting up a queue in output binding for a function , we have the ability to set a default visibility timeout as part of the host.json "queues": { "visibilityTimeout" : "00:00:30" } . However for each message if we need a custom visibility timeout it can only be achieved by the function queue_client.send_message(message,visibility_timeout=visibility_timeout_seconds) . This unnecessarily bloats the function app size as this step requires azure.storage.queue package ( python ) . But I guess it's the same across langauges . If one can be allowed to initialize the queue message object even when it is in output binding and set visibility timeout property to the step queueoutput.set(message,visibility_timeout=visibility_timeout_seconds ) , it can work wonders in uses cases that require a custom visibility timeout for each message without bloating the function app size.



azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MikeUrnun avatar image
0 Votes"
MikeUrnun answered RajeshR-0720 commented

Hello @RajeshR-0720 - Welcome to Q&A and thank you for posting here!

My two cents on the matter is that the configs that go into host.json are global by design (irrespective of binding type) and used during the instantiation of the runtime, whereas something like defining distinct values for visibilityTimeout property for each message is a more granular detail in scope & specific to an abstraction where the messages flow through the runtime itself. I'd assume that's mainly why this configuration was put together the way it is today and how its functionalities work presently.

Since your post is suggestive of expanding an existing feature rather than a how-to or a troubleshooting question, I invite you to engage the Functions team directly on Functions host repo. Normally, we would recommend submitting a new feature on Azure UserVoice platform but it is currently under review for an improved experience.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello Mike,

Thanks . Makes sense . Mine was more a suggestion in form of a question . Will log this suggestion in the Functions host repo .

0 Votes 0 ·