Queue Azure queue storage (1)

Label Azurecloud computingQueue storage
877 people read comments(0) Collection Report

Following in front of some of the Table and Blob, and other storage, and today I will give you a brief introduction to the Queue queue storage. As in the past, this article is an example of the C# code, as well as Storage Client for.NET. Azure to do the introduction.

First of all, we will introduce what is Queue (queue) storage

Queue Azure storage is a more commonly used and powerful storage services, people can access the Azure a lot of storage information from around the world through the way of HTTP or HTTPS. A queue message can be up to 64KB, and a queue can store millions of messages until it reaches a maximum limit of a storage account. A storage account can store up to blob of 500TB, queue or table data.

Commonly used Queue storage includes:

  • Create a series of asynchronous processing operations

  • Transfer information from one Web role Azure to another Worker role Azure

Queue service concept
Write the picture here.

  • URL format: Queues can be accessed by the following URL format:
Account> http://<storage.queue.core.windows.net/<queue>
  • The following URL address is the address shown in the image above.
Http://myaccount.queue.core.windows.net/imagesToDownload
  • Storage account: all access is based on the storage account.

  • Queue queueA queue contains a series of messages. All messages must be in a queue.

  • MessageA message may be in a variety of formats, but not more than 64KB

Create a Azure storage account

You can refer to the previous article to create a Azure storage account. You can log on to Management Portal Azure to create a new account, you can also from the PowerShell Azure or CLI Azure to create, or the use of Storage Resource Azure Provider REST API.

Create a storage connection string

.NET version of the Azure storage client library supports the use of a storage connection string to configure the node and password to access the storage service. It is recommended that you store this link in a configuration file, rather than writing it directly into your code. You can use the following two ways to save your connection string.

If your application is in the Azure cloud service, you can use the Azure configuration system to save your connection string (.Csdef and.Cscfg).

If your application in the Azure virtual machine, or your.NET application is not in the Azure. You can save the connection string in the.NET configuration system (web.config or app.config).

From Azure cloud services to configure the connection string
Azure cloud services on the management Portal provides a special configuration algorithm to dynamically modify your profile without the need to deploy your application from the new.

Let's introduce how to do it:

1.. In Studio Solution Explorer Visual, in the Development Project Roles in the Azure folder, right click on your role worker or role web, and then click Properties.

Write the picture here.

2.. Click Settings, and then click Setting Add.

Write the picture here.

A Setting1 has been built up.

3.. In the Type Setting1 drop-down menu, select String Connection.

Write the picture here.

4.. Then click... Button Then Account Connection String Storage dialog box will open.

5.. Choose whether you want to use emulator storage (Microsoft Azure on your machine to simulate the storage) or remote Azure storage account. You can use emulator to reduce the overhead of storage.
If you select the remote Azure storage account in the cloud, you need to enter the access key primary.

Write the picture here.

6.. ModificationNameandSetting1So that it is more convenient to remember

Write the picture here.

Configure your connection string through the.NET configuration file

If your program is not Azure cloud services, including the Azure web site, Azure virtual machine, and some of the services that are not running in Azure. Recommended that you use the.NET to configure, format as follows

<Configuration>
    <AppSettings>
        <Add Key="StorageConnectionString" Value="DefaultEndpointsProtocol=https; AccountName=account-name; AccountKey=account-key">
    < /AppSettings>
< /Configuration>

Example below, may be similar to your own config file:

<Configuration>
    <AppSettings>
        <Add Key="StorageConnectionString" Value="DefaultEndpointsProtocol=https; AccountName=storagesample; AccountKey=nYV0gln9fT7bvY+rxu2iWAEyzPNITGkhM88J8HUoyofpK7C8fHcZc2kIZp6cKgYRUM74lHI84L50Iau1+9hPjB==">
    < /AppSettings>
< /Configuration>

After the configuration is complete, we will be able to complete our mission.

top
Zero
tread
Zero
Guess you're looking for
View comments
* the above user comments only represent their personal views, does not represent the views or position of the CSDN website
    personal data
    • Visit8134 times
    • Integral:One hundred and seventy-eight
    • Grade
    • Rank:Thousands of miles away
    • Original10
    • Reproduced:2
    • Translation:0
    • Comments:2
    Article Archive
    Latest comments