现在的位置: 首页 > 综合 > 正文

Windows Azure(四-3):云上的MSMQ–Queue Storage

2013年07月07日 ⁄ 综合 ⁄ 共 2697字 ⁄ 字号 评论关闭

系列文章:

Azure(一):简介

Window Azure(二):开发和发布一个Azure程序

Windows Azure(三):结构

Windows Azure(四-1):Worker Role(对应传统服务器BackGroud 程序)

Windows Azure(四-2):云端的文件系统(Blob Storage)

概述

      Queue Storage提供给我们一个云端的队列。可以用Queue Storage来进行进程间的相互通信(包括运行在不同机器上的进程之间的通信)。

使用场景

     在一个Web应用程序中,用户通过表单递交给服务器数据,服务器收到数据后将进行处理,而这一处理将花费很多时间。这种情况下,服务器端通过Queue Storage可以把用户递交的信息存储在队列中,后台再运行一个程序从队列中取得数据进行信息的处理。(说白就是队列机机制的使用场景,只不过现在是在云端的处理,同样使用RestAPI进行调用,可查看Queue 服务 API

Queue 服务API

Operation

Description

List Queues

Lists all queues under the given account.

Create Queue

Creates a new queue under the given account.

Delete Queue

Deletes a queue.

Get Queue Metadata

Returns queue properties, including user-defined metadata.

Set Queue Metadata

Sets user-defined metadata on the queue.

Put Message

Adds a message to the queue.

Get Messages

Retrieves a message from the queue and makes it invisible to other consumers.

Peek Messages

Retrieves a message from the front of the queue, without changing the message visibility.

Delete Message

Deletes a specified message from the queue.

Clear Messages

Clears all messages from the queue.

Clears all messages from the queue.

 Clear all messages from the queue.

Operation Description

List Queues

Lists all queues under the given account.

Create Queue

Creates a new queue under the given account.

Delete Queue

Deletes a queue.

Get Queue Metadata

Returns queue properties, including user-defined metadata.

Set Queue Metadata

Sets user-defined metadata on the queue.

Put Message

Adds a message to the queue.

Get Messages

Retrieves a message from the queue and makes it invisible to other consumers.

Peek Messages

Retrieves a message from the front of the queue, without changing the message visibility.

Delete Message

Deletes a specified message from the queue.

Clear Messages

Operation Description

List Queues

Lists all queues under the given account.

Create Queue

Creates a new queue under the given account.

Delete Queue

Deletes a queue.

Get Queue Metadata

Returns queue properties, including user-defined metadata.

Set Queue Metadata

Sets user-defined metadata on the queue.

Put Message

Adds a message to the queue.

Get Messages

Retrieves a message from the queue and makes it invisible to other consumers.

Peek Messages

Retrieves a message from the front of the queue, without changing the message visibility.

Delete Message

Deletes a specified message from the queue.

Clear Messages

具体使用

模拟一种情形:客户端提交数据入Queue,Server端处理

客户端(一个新建项目Console 项目,具体可见上一篇Windows Azure(四-2):云端的文件系统(Blob Storage) 的创建方式

 

 

Operation Description

List Queues

Lists all queues under the given account.

Create Queue

Creates a new queue under the given account.

Delete Queue

Deletes a queue.

Get Queue Metadata

Returns queue properties, including user-defined metadata.

Set Queue Metadata

Sets user-defined metadata on the queue.

Put Message

Adds a message to the queue.

Get Messages

Retrieves a message from the queue and makes it invisible to other consumers.

Peek Messages

Retrieves a message from the front of the queue, without changing the message visibility.

Delete Message

Deletes a specified message from the queue.

Clear Messages

抱歉!评论已关闭.