text: This guide shows you how to perform common scenarios using the Windows Azure Queue storage service. The samples are written using the Python API. The scenarios covered include inserting, peeking, getting, and deleting queue messages, as well as creating and deleting queues. For more information on queues, refer to the Next Steps section.
  What is Queue Storage? Concepts Create a Windows Azure Storage Account How To: Create a Queue How To: Insert a Message into a Queue How To: Peek at the Next Message How To: Dequeue the Next Message How To: Change the Contents of a Queued Message How To: Additional Options for Dequeuing Messages How To: Get the Queue Length How To: Delete a Queue Next Steps
  Windows. Common uses of Queue storage include:
  The Queue service contains the following components:
  URL format: Queues are addressable using the following URL format: http://<storage account>.queue.core.windows.net/<queue>
  <storage account>
  <queue>
  The following URL addresses one of the queues in the diagram:
  Storage Account: All access to Windows Azure Storage is done through a storage account. A storage account is the highest level of the namespace for accessing queues. The total size of blob, table, and queue contents in a storage account cannot exceed 100TB.
  Queue: A queue contains a set of messages. All messages must be in a queue.
  Message: A message, in any format, of up to 64KB.
  To use storage operations, you need a Windows Azure storage account. Youcan create a storage account by following these steps. (You can also create a storage account using the REST API.)
  Log into the Windows Azure Management Portal.
  At the bottom of the navigation pane, click NEW.
  Click DATA SERVICES, then STORAGE, and then click QUICK CREATE.
  In URL, type a subdomain name to use in the URI for the storage account. The entry can contain from 3-24 lowercase letters and numbers. This value becomes the host name within the URI that is used to address Blob, Queue, or Table resources for the subscription.
  Choose a Region/Affinity Group in which to locate the storage. If you will be using storage from your Windows Azure application, select the same region where you will deploy your application.
  Optionally, you can enable geo-replication.
  Click CREATE STORAGE ACCOUNT.
  Note: If you need to install Python or the Client Libraries, please see the Python Installation Guide.
  The QueueService object lets you work with queues. The following code creates a QueueService object. Add the following near the top of any Python file in which you wish to programmatically access Windows Azure Storage:
  from azure.storage import *
  The following code creates a QueueService object using the storage account name and account key. Replace 'myaccount' and 'mykey' with the real account and key.
  queue_service = QueueService(account_name='myaccount', account_key='mykey')
  queue_service.create_queue('taskqueue')
  To insert a message into a queue, use the put_message method to create a new message and add it to the queue.
  queue_service.put_message('taskqueue', 'Hello World')
  You can peek at the message in the front of a queue without removing it from the queue by calling the peek_messages method. By default, peek_messages peeks at a single message.
  messages = queue_service.peek_messages('taskqueue')
  for message in messages:
  print(message.message_text).message_text)
  queue_service.delete_message('taskqueue', message.message_id, message.pop_receipt)
  You can change the contents of a message in-place in the queue. If the message represents a work task, you could use this feature to update the status of the work task. The code below uses the update_message method to update a message.
  messages = queue_service.get_messages('taskqueue')
  for message in messages:
  queue_service.update_message('taskqueue', message.message_id, 'Hello World Again', message.pop_receipt, 0)ofmessages=16, visibilitytimeout=5*60)
  for message in messages:
  print(message.message_text)
  queue_service.delete_message('taskqueue', message.message_id, message.pop_receipt)
  You can get an estimate of the number of messages in a queue. The get_queue_metadata method asks the queue service to return metadata about the queue, and the x-ms-approximate-messages-count should be used as the index into the returned dictionary to find the count. The result is only approximate because messages can be added or removed after the queue service responds to your request.
  queue_metadata = queue_service.get_queue_metadata('taskqueue')
  count = queue_metadata['x-ms-approximate-messages-count']
  To delete a queue and all the messages contained in it, call the delete_queue method.
  queue_service.delete_queue('taskqueue')
  Now that you’ve learned the basics of queue storage, follow these links to learn how to do more complex storage tasks.