Open MerrionComputing opened 2 years ago
This could be really difficult because of this:- https://docs.microsoft.com/en-us/azure/azure-functions/durable-functions-checkpointing-and-replay#orchestrator-code-constraints
This means all asynch interaction with the Command event stream must be performed inside of an Activity type of function
In fact there needs to be some more work as when the durable function orchestration is called again (as it is for the orchestration function to work) then a new unique identifier is assigned for the Command
even though it is the same orchestration...
There needs to be a way to pick up the orchestration identifier and use that instead of the new guid when the command is instantiated...or a constructor for the Command
that takes the parameter of IDurableOrchestrationContext
The "ApplyAccruedInterestCommand" function should fire off a durable functions orchestration (the same way that the AccrueInterest one does) so that the orchestration is all handled by that rather than event grid messages.