c# - Azure WebJob QueueTrigger How DeleteMessage after get it? -


i have 1 webjob on azure, queuetrigger. job long (more 30 minutes)

public async static task processqueuemessageasync([queuetrigger(queuename)] string ijobid) { //doing long job } 

my problem how delete message in queue after triggering. message becomes invisible until timespan (30s default) comes. less of job duration. suppose have delete message @ beginning of trigger method. find how when looping getmessage()method instead triggering. how trigger, because don't have message object run .deletemessage()?

answered michael curd on msdn forums, , quoted here:

the sdk should handle that. stated, message leased (or become invisible) 30 seconds default. if job takes longer that, lease renewed. message not become available instance of function unless host crashes or function throws exception. when function completes successfully, message deleted sdk. shouldn't need write special code scenario.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -