I have 2 different queue functions, they both update different properties of the same database entity (using unit of work pattern).
Each function has his own queue and poison queue. The message of each queue contains the same entityId. Both functions need to be executed in parallel.
I would like to execute a hook or similar when there is no more messages in any of the queues (queue-one, queue-one-poison, queue-two and queue-two-poison) where entityId == xxxx
My current code for the functions:
[Function("functionone")]
[ExponentialBackoffRetry(5, "00:00:04", "00:01:00")]
public async Task Run([QueueTrigger("queue-one")] MyMessage message, FunctionContext executionContext)
{
// logic here...
}
What options do I have here?