Skip to content

Files

Latest commit

 

History

History

function_python_servicebus

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Azure Functions with Python and Azure Service Bus Topics and Queues

Service Bus Bindings for Azure Functions

Check the Service Bus Binding settings to understand how each setting works.

maxConcurrentCalls

The maxConcurrentCalls works at the host level and it's used in conjunction with the maxConcurrentSessions property to control the maximum number of messages each function processes concurrently on each instance.

These seetings are conigured in the host.json file:

"extensions": {
    "serviceBus": {
      "maxConcurrentCalls": 1
    }
  }

maxConcurrentCalls can be overridden if dynamicConcurrencyEnabled is set to true in the host.json file. This allows the host to dynamically scale the number of concurrent calls based on the number of messages in the queue or subscription. The default value is false. Check for more information here

Working Configuration

  • Since no awaitable methods or call is used, all methods are synchronous. (no async/await)
  • The maxConcurrentCalls is set to 1 in the host.json file.
  • The dynamicConcurrencyEnabled is not set in the host.json file. So it's false by default.
  • Inside the Azure Function configuration:
    • FUNCTIONS_WORKER_PROCESS_COUNT is set to 1.
    • PYTHON_THREADPOOL_THREAD_COUNT is set to None.
  • Messages are sent to the Service Bus Queue using a global Service Bus client or output bindings.

More Information