I've an azure webjob where there is a function triggered by an azure queue
public class Functions
{
public static void ProcessQueueMessage([QueueTrigger("scannedcodes")] string message, TextWriter log)
{
// do something
}
}
In this application there is also a timer with an interval of 5 minutes. When the Elapsed event of the timer is fired, I need to do something in the event handler that requires the method triggered by the queue is not running.
The true problem is that the queue trigger run 16 parallel threads, so each thread can process a queue message. So I need all threads aren't running to execute code into the timer event handler.