0

I’m planning to build a mediator service to dynamically bind to various azure service bus subscriptions. This is to facilitate the http callback pattern using Azure service bus to manage the clients offset and AzFunc for circuit breaker scenarios.

What I need to do is : I need to create (and remove) function/bindings at runtime. Could someone shed some light on best practice?

I understand that Logic Apps might be better suited but we’re developing in an enterprise environment and have limited components available e.g. AzFunctions and AzService Bus

Any help or guidance would be greatly appreciated.

Swinkaran
  • 1,207
  • 1
  • 12
  • 19
arbs.io
  • 38
  • 3
  • Hi, if the solution helps your problem, could you please [accept](https://stackoverflow.com/help/someone-answers) it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in), thanks in advance~ – Hury Shen Feb 10 '20 at 04:35

1 Answers1

0

You can implement this requirement by modify the function.json(modify the binding in function.json), please refer to the rest api below to edit your function.json.

  1. Use Kudu API to change function.json https://github.com/projectkudu/kudu/wiki/REST-API

PUT https://{functionAppName}.scm.azurewebsites.net/api/vfs/{pathToFunction.json}, Headers: If-Match: "*", Body: new function.json content.

  1. Then send request to apply changes.

POST https://{functionAppName}.scm.azurewebsites.net/api/functions/synctriggers

Hury Shen
  • 14,948
  • 1
  • 9
  • 18