0

I have an Azure WebJob and I use the CloudQueue to communicate to it. From my Web Application:

logger.Info("Writing Conversion Request to Document Queue " + JsonConvert.SerializeObject(blobInfo));                        
var queueMessage = new CloudQueueMessage(JsonConvert.SerializeObject(blobInfo));                        
documentQueue.AddMessage(queueMessage);

I verify in my log file that I see the INFO statement being written.

However, when I go to my queue:

enter image description here

What baffles me even more ... this Queue was full of messages before, including timestamps of this evening. 

I went and cleared out my Queue, and after clearing it, it will no longer receive messages.

Has anyone ever seen this before?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
Philip Tenn
  • 6,003
  • 8
  • 48
  • 85
  • Two things: 1) It may be entirely possible that your WebJob has already processed the message and 2) Use another tool (e.g. Microsoft's Storage Explorer) to verify the contents of the queue. – Gaurav Mantri Jun 20 '17 at 02:44
  • @GauravMantri Not processed message ... I had the debugger connected/breakpoint in WebJob. 2. Thanks I'll download and install this. – Philip Tenn Jun 20 '17 at 02:46
  • @GauravMantri Okay, I'll bite ... I downloaded the Microsoft Storage Explorer and all my messages are in `documents-poision`. Any ideas? – Philip Tenn Jun 20 '17 at 02:49
  • I believe your WebJob is trying to process the messages and is failing to do so. After "x" attempts (I believe default is 5), it will move the messages to the poison queue (queuename-poison). – Gaurav Mantri Jun 20 '17 at 02:52
  • @GauravMantri Thank you. I will look into the WebJob. – Philip Tenn Jun 20 '17 at 13:12

1 Answers1

2

As Gaurav Mantri mentioned in the comments that the message shoud be processed by your WebJob. When it is up to max attempts then will be moved to poison queue.

We could also get more details about poison messages from azure official tutorials. The following is the snippet from the tutorials.

Messages whose content causes a function to fail are called poison messages. When the function fails, the queue message is not deleted and eventually is picked up again, causing the cycle to be repeated. The SDK can automatically interrupt the cycle after a limited number of iterations, or you can do it manually.

The SDK will call a function up to 5 times to process a queue message. If the fifth try fails, the message is moved to a poison queue. The maximum number of retries is configurable.

Community
  • 1
  • 1
Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47