Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.47k stars 4.8k forks source link

[FEATURE REQ] maxPollingInterval Per Queue or QueueTriggered Function #33000

Open phil000 opened 1 year ago

phil000 commented 1 year ago

Library name

azure-sdk-for-net

Please describe the feature.

Hello, We have some queue-triggered azure functions running on .NET 7 in isolated mode.

We have set some custom properties in host.json file:

"extensions": {
      "queues": {
         "maxPollingInterval": "00:00:05",
         "visibilityTimeout": "00:15:00",
         "batchSize": 4,
         "maxDequeueCount": 16,
         "newBatchThreshold": 2,
         "messageEncoding": "base64"
      }
   }

However, these settings are not appropriate for all functions. In fact they really should differ quite a lot between functions\queues.

Is it possible to have these types of values per queue or per queue-triggered function, so that each can have their own:

  1. Polling interval
  2. Visibility Timeout
  3. Max Dequeue Count

Less important per queue:

  1. BatchSize
  2. NewBatchThreshold
phil000 commented 1 year ago

see also #31611

jsquire commented 1 year ago

Thank you for reaching out and we regret that you're having some difficulties. Would you please let us know which Azure SDK package and version you're referring to so that we can triage this to the right folks to assist?

phil000 commented 1 year ago

@jsquire Microsoft.Azure.Functions.Worker.Sdk 1.7.0 Microsoft.Azure.Functions.Worker 1.10.0 Microsoft.Azure.Functions.Worker.Extensions.Storage 5.0.1

ghost commented 1 year ago

Thank you for your feedback. This has been routed to the support team for assistance.

navba-MSFT commented 1 year ago

@phil000 Apologies for the late reply. Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update.

navba-MSFT commented 1 year ago

@phil000 To set the Polling Interval, Visibility Timeout and Dequeue Count, You can use the QueueClient class to manipulate the Azure Storage Queue. Please find the sample code here.

phil000 commented 1 year ago

If we were interacting with the queues manually perhaps we could do that.

However, we are using queue triggered functions, so a lot of that is taken out of our hands. See the host.json configuration I posted.

e.g. We are fed queue messages at a function entry point:

[Function("SendSmsMessage")]
public async Task Run([QueueTrigger(Queues.Outbox)] string message, string id, int dequeueCount, etc)

We are happy to be using queue triggered functions and it works well for us. We just need some more control over the interaction parameters for each function\queue, especially:

phil000 commented 1 year ago

I will also point out:

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

Issue Details
### Library name azure-sdk-for-net ### Please describe the feature. Hello, We have some queue-triggered azure functions running on .NET 7 in isolated mode. We have set some custom properties in host.json file: ``` "extensions": { "queues": { "maxPollingInterval": "00:00:05", "visibilityTimeout": "00:15:00", "batchSize": 4, "maxDequeueCount": 16, "newBatchThreshold": 2, "messageEncoding": "base64" } } ``` However, these settings are not appropriate for all functions. In fact they really should differ quite a lot between functions\queues. Is it possible to have these types of values _per queue or per queue-triggered function_, so that each can have their own: 1. Polling interval 2. Visibility Timeout 3. Max Dequeue Count Less important per queue: 1. BatchSize 2. NewBatchThreshold
Author: phil000
Assignees: navba-MSFT
Labels: `Storage`, `Service Attention`, `Client`, `customer-reported`, `feature-request`, `needs-team-attention`
Milestone: -
navba-MSFT commented 1 year ago

@phil000 Thanks for clarifying. I am adding Service team to look into this.

@xgithubtriage Could you please look into this ?

ArtyomYatskevich commented 10 months ago

Hey guys, any updates regarding this feature request ?