Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit number of message process attempts in Azure storage queue

I need to keep track of how many failed attempts have been made to process a message in an azure storage queue and delete the message after N unsuccesful attempts.

I have searched, but have not found any particular property that does this automaticaly and was wondering if there was a way other than using a counter in a storage table.

like image 301
AJC Avatar asked Nov 10 '11 15:11

AJC


People also ask

What is the size limit for messages stored in Azure storage queue?

Azure documentation states that Storage queue message cannot exceed 64 KB.

What is the maximum size limit for each message in queue storage?

A queue message can be up to 64 KB in size. A queue may contain millions of messages, up to the total capacity limit of a storage account.

What is dequeue count in Azure queue?

This count is maintained by Azure Queue service, this is per message count. The DequeueCount element has a value of 1 the first time the message is dequeued. This value is incremented each time the message is subsequently dequeued.

What is the difference between Azure storage queue and Service Bus queue?

Azure Queues provide a uniform and consistent programming model across queues, tables, and BLOBs – both for developers and for operations teams. Service Bus queues provide support for local transactions in the context of a single queue.


1 Answers

Each cloud queue message has a DequeueCount property. Does this help?

REST API reference here.

As for how to delete messages automatically after n attempts: There's nothing that automatically does this. You'll need to implement your own poison-message handling in Windows Azure queues, based on DequeueCount.

Alternatively, Azure Service Bus queues have a dead-letter queue for undeliverable messages (or ones that can't be processed). More info here.

like image 51
David Makogon Avatar answered Oct 07 '22 01:10

David Makogon