0

I have a Azure queue trigger app. It tries to process message asap but when I have 1000s of message in the queue I want to limit number queue messages it process per second. Is there a way to setup limit?

My goal is to slow down the rate at which my function processes messages.

{
  "generatedBy": "Microsoft.NET.Sdk.Functions-1.0.24",
  "configurationSource": "attributes",
  "bindings": [
    {
      "type": "queueTrigger",
      "queueName": "fred",
      "connection": "",
      "name": "myQueueItem"
    }
  ],
  "disabled": false,
  "scriptFile": "../bin/run.dll",
  "entryPoint": "Fred.Run"
}
Fred
  • 41
  • 1
  • 6

1 Answers1

1

You cannot limit to "X requests per second" as this depends on your processing logic. However, you can configure the batch size and then also to how many instances your Function will scale out.

See here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue-trigger?tabs=csharp#concurrency

https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#website_max_dynamic_application_scale_out

silent
  • 14,494
  • 4
  • 46
  • 86