Queues

A Queue is a FIFO data structure that allows you to transmit messages from on application to another.

Basics

To allocate a cache-based queue of strings, use:
CachedQueue<string> queue = new CachedQueue<string>("my_queue");

To enqueue a new string:
queue.Enqueue("This is a test");

And to dequeue from the queue:
var value = queue.Dequeue();

Remarks

  • For high-reliable messaging, use TableStroageQueue, which is based on a Windows Azure Table, instead of CachedQueue.
  • You can set a maximum size on a queue. If you attempt to put more items than allowed, you’ll get an InvalidOperationException exception.
  • WACEL Queue provides a cheap and fast queueing solution, however it has limited features. If you are looking for features such as sessions, transactions and ensured delivery, you should consider Windows Azure Service Bus Queues.

Last edited Nov 4, 2013 at 6:10 PM by Haishi, version 4