0

I'm attempting to use azure durable tasks to orchestrate some microservices but am running into a small gap in understanding how taskhubs work as well as coordinating the projects correctly.

I'm trying to create a main orchestrator that is in charge of kicking off sub orchestrations to do the actual work. Below is a diagram of what I'm trying to achieve.

enter image description here

The idea is that each .net Project will be able to scale independent of the other, so if .Net project 2 was under quite a bit of load I'd be able to scale that project only and not have to worry about the other 2 projects. The problem I'm running into is from what I understand the taskhub queue is shared by all the services so there is no way to have each process focus on only it's work, meaning each project can see everything in the queue and it may cause 1 project to dequeue a message intended for project 2. Is this correct?

From reading the documentation it doesn't seem clear that I can send project 2 it's sub orchestration messages as well as send project 3 it's specific orchestration.

Am I thinking about this problem incorrectly, is there a different way I might want to approach this?

dbarnes
  • 1,803
  • 3
  • 17
  • 31

1 Answers1

1

What you want cannot be achieve.

As of now, Azure Function only allow orchestrator functions to call activity and sub-orchestrator functions that exist in the same function app. The main reason is a technical one: queues within a task hub are shared across all functions, so there's no way to guarantee that a message intended for FunctionAppA does not get picked up by FunctionAppB.

If cross-project communication is required, the correct method is to use http or queue.

Cindy Pau
  • 13,085
  • 1
  • 15
  • 27
  • Is this a limitation on the design/implementation? Or is this something that is possible to achieve by changing the Orchestration service to be something else? – dbarnes Dec 23 '19 at 15:04
  • @dbarnes Many people have also proposed your idea, but Azure Function developers have not yet had a good way to support this. So it was banned from the beginning. If you want Project1 to control Project2, or pass some information, all you can do is to trigger Project2 and pass in information using http or queue. – Cindy Pau Dec 24 '19 at 06:27