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

系列文章:

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值