Skip to content

[Question] In what order durable function process sub-orchestrator and activity function #2737

Answered by cgillum
quytrieu37 asked this question in Q&A
Discussion options

You must be logged in to vote

In other words, steps 4 and 5 always enqueue after 2 and 3.

Yes, this is the expectation. I'll try to explain why:

  1. The main orchestrator schedules tasks 1, 2, 3 and then awaits. When the orchestration awaits, messages for starting 1, 2, 3 are all put on the internal queue ([1, 2, 3]).
  2. Message 1 is on the front of the queue, so it will be processed first. Sub-orchestration 1 runs, schedules 4 & 5, and then awaits, adding two more messages to the end of the queue. The queue is now [2, 3, 4, 5].
  3. Because 2 is on the top of the queue, it gets executed next. Sub-orchestration schedules 6 & 7 and then awaits, adding those messages to the queue. Now the queue looks like [3, 4, 5, 6, 7]
  4. This pr…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@quytrieu37
Comment options

@cgillum
Comment options

@quytrieu37
Comment options

@quytrieu37
Comment options

@quytrieu37
Comment options

Comment options

You must be logged in to vote
3 replies
@quytrieu37
Comment options

@cgillum
Comment options

Answer selected by quytrieu37
@quytrieu37
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants