pythonazuredeploymentazure-functionsazureservicebus

Azure Function App - deploy multiple Python functions with different programming models


I'm working on a Azure Function App that has 2 functions written in Python:

  1. Function1 using v2 programming model - already working fine
  2. Function2 - new function with service bus trigger. I need to use v1 programming model there since the service bus requires sessions, and v2 doesn't seem to support that. I handle that with isSessionsEnabled parameter set to true in function.json file.

The challange is whether I can deploy 2 functions with different programming models into the same Function App. I'm able to deploy single function from VS Code, but struggle with deploying both at the same time.


Solution

  • I do agree and thanks @Peter Bons for the input, that v1 and v2 model functions cannot be deployed to same function app. Because both have different run time versions and dependencies due to which function will be unreachable.

    Even when you run locally, Function is not even recognized:

    enter image description here

    It only appears when routing needs is added as v2:

     rithapp = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
    @rithapp.route(route="servicebus_trigger")
    

    So, only way is to create different function apps.