简体   繁体   中英

Azure cannot Add Message to Queue

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:

在此处输入图片说明

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM