I have one webjob on azure, with a QueueTrigger. The job is long (More than 30 minutes)
public async static Task ProcessQueueMessageAsync([QueueTrigger(QUEUENAME)] string iJobId)
{
//doing my long job
}
My problem is how delete the message in the queue after triggering. The message becomes invisible until a the timespan (30s by default) comes. Much less of my job duration. So I suppose that I have to delete the message at the beginning of the trigger method.
I find how to do it when you looping with GetMessage()
method instead triggering. But how to do it with trigger, because I don't have the message object to run .DeleteMessage()
?
Answered by Michael Curd on the MSDN Forums, and quoted here: