Reputation: 30388
I'm running some tests on my web app which has a WebJob running to handle some backend tasks.
I connect to the queue using Cloud Explorer in Visual Studio and clear all the messages from the queue. When I restart my WebJob, it still finds messages and tries to process them.
Where are these messages coming from? If I clear the queue through Cloud Explorer in Visual Studio, shouldn't the queue be empty? BTW, I also clear the queue poision.
Upvotes: 1
Views: 5496
Reputation: 13558
The Clear Queue command in the VS Queue explorer will indeed delete all messages in the queue, including any messages that may currently be invisible due to their invisibility timeout. When viewing the queue, if there are any invisible messages you'll see them in the display text in the bottom of the window (e.g. "0 of 5 messages").
So if you've executed the Clear Command and it shows "0 of 0" messages the queue is completely empty. If after that your queue triggered function gets invoked on that queue, you must have some code somewhere that is adding messages to that queue. Not a very satisfying answer perhaps, but the neither the WebJobs SDK nor Azure Storage itself is going to be manufacturing any messages in this way :)
Upvotes: 2