question

KaveenRodrigo-9048 avatar image
0 Votes"
KaveenRodrigo-9048 asked KaveenRodrigo-9048 commented

Can durable functions be used across multiple function apps?

Hello all, Thanks in advance

I'm aware of the durable functions documentation
- https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp

My question is can durable functions be used between multiple function apps? If not what is the best practice for doing a durable function chaining scenario where it spans multiple apps.

azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

BrendanHayek avatar image
1 Vote"
BrendanHayek answered KaveenRodrigo-9048 commented

Functions are designed to have a single Trigger. The Trigger is what activates a function, allowing it begin. However, you can use as many Actions as you would like. The Actions are what the function calls to - such as another function.

That being said, id you want to use a durable function between function apps, you can call your durable function within your other functions as an Action.

The resource that you linked [ https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp ] is useful to recognize the different patterns that are applicable.

However, you might want to look into using HTTP Requests. This flow allows you to use the function and pass specific parameters into another one. I would recommend taking a look at this link https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=csharp in hopes that it will provide the specifics. You want to use the HTTP Requests to activate another script, passing through desired parameters that the new script would need to function. Again, take a loot at the documentation to see some cool things that can be done.

Hope this helps!

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@KaveenRodrigo-9048 To add to @BrendanHayek 's answer, while you cannot directly call other activity functions from another durable function app, you could expose orchestrations as Async HTTP APIs which you can call using the HTTP API added in Durable Functions 2.0.


2 Votes 2 ·

Thanks, Pramod. Wasn't aware of the Durable HTTP Utitlity.

0 Votes 0 ·