Azure 服务总线中的 AMQP 1.0:基于请求/响应的操作AMQP 1.0 in Azure Service Bus: request-response-based operations

本文定义 Azure 服务总线基于请求/响应的操作的列表。This article defines the list of Azure Service Bus request/response-based operations. 此信息基于 AMQP 管理版本 1.0 工作草案。This information is based on the AMQP Management Version 1.0 working draft.

有关详细的线级 AMQP 1.0 协议指南(其中介绍了如何基于 OASIS AMQP 技术规范实现和建立服务总线),请参阅 Azure 服务总线和事件中心的 AMQP 1.0 协议指南For a detailed wire-level AMQP 1.0 protocol guide, which explains how Service Bus implements and builds on the OASIS AMQP technical specification, see the AMQP 1.0 in Azure Service Bus and Event Hubs protocol guide.

概念Concepts

实体描述Entity description

实体说明是指服务总线的 QueueDescription 类TopicDescription 类SubscriptionDescription 类对象。An entity description refers to either a Service Bus QueueDescription class, TopicDescription class, or SubscriptionDescription class object.

中转消息Brokered message

表示映射到 AMQP 消息的服务总线中的消息。Represents a message in Service Bus, which is mapped to an AMQP message. 服务总线 AMQP 协议指南中定义了映射。The mapping is defined in the Service Bus AMQP protocol guide.

附加到实体管理节点Attach to entity management node

本文档中所述的全部操作都遵循请求/响应模式,这些操作的范围限制到实体,并需要附加到实体管理节点。All the operations described in this document follow a request/response pattern, are scoped to an entity, and require attaching to an entity management node.

创建用于发送请求的管理节点链接。Creates a link to the management node for sending requests.

requestLink = session.attach(
role: SENDER,
    target: { address: "<entity address>/$management" },
    source: { address: ""<my request link unique address>" }
)

创建用于从管理节点接收响应的链接。Creates a link for receiving responses from the management node.

responseLink = session.attach(
role: RECEIVER,
    source: { address: "<entity address>/$management" }
    target: { address: "<my response link unique address>" }
)

传输请求消息Transfer a request message

传输请求消息。Transfers a request message.
对于支持事务的操作,可以选择添加事务状态。A transaction-state can be added optionally for operations which supports transaction.

requestLink.sendTransfer(
        Message(
                properties: {
                        message-id: <request id>,
                        reply-to: "<my response link unique address>"
                },
                application-properties: {
                        "operation" -> "<operation>",
                }
        ),
        [Optional] State = transactional-state: {
                txn-id: <txn-id>
        }
)

接收响应消息Receive a response message

从响应链接接收响应消息。Receives the response message from the response link.

responseMessage = responseLink.receiveTransfer()

响应消息采用以下形式:The response message is in the following form:

Message(
properties: {
        correlation-id: <request id>
    },
    application-properties: {
            "statusCode" -> <status code>,
            "statusDescription" -> <status description>,
           },
)

服务总线实体地址Service Bus entity address

必须如下所示处理服务总线实体:Service Bus entities must be addressed as follows:

实体类型Entity type 地址Address 示例Example
queuequeue <queue_name> "myQueue"

"site1/myQueue"
主题topic <topic_name> "myTopic"

"site2/page1/myQueue"
订阅subscription <topic_name>/Subscriptions/<subscription_name> "myTopic/Subscriptions/MySub"

消息操作Message operations

消息续订锁Message Renew Lock

按实体描述中指定的时间延长消息锁。Extends the lock of a message by the time specified in the entity description.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:renew-lock
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含映射必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
lock-tokens uuid 的数组array of uuid Yes 要续订的消息锁令牌。Message lock tokens to renew.

备注

锁定标记是收到消息的 DeliveryTag 属性。Lock tokens are the DeliveryTag property on received messages. 请参阅以下使用 .NET SDK 检索这些标记的示例。See the following example in the .NET SDK which retrieves these. 该标记也可能以“x-opt-lock-token”的形式出现在“DeliveryAnnotations”中,但这不能得到保证,DeliveryTag 应该是首选。The token may also appear in the 'DeliveryAnnotations' as 'x-opt-lock-token' however, this is not guaranteed and the DeliveryTag should be preferred.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败。200: OK - success, otherwise failed.
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

响应消息正文必须包含 amqp-value 部分,其中所含映射必须包括以下条目:The response message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
expirationsexpirations 时间戳的数组array of timestamp Yes 对应于请求锁令牌的消息锁令牌新到期日。Message lock token new expiration corresponding to the request lock tokens.

速览消息Peek Message

在不锁定的情况下速览消息。Peeks messages without locking.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:peek-message
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
from-sequence-number longlong Yes 从其开始速览的序列号。Sequence number from which to start peek.
message-count intint Yes 要速览的消息数量的上限。Maximum number of messages to peek.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 有更多消息200: OK - has more messages

204:无内容 - 没有更多消息204: No content - no more messages
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

响应消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The response message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
messagesmessages 映射列表list of maps Yes 消息列表,其中每个映射表示一条消息。List of messages in which every map represents a message.

代表消息的映射必须包含以下条目:The map representing a message must contain the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
messagemessage 字节的数组array of byte Yes AMQP 1.0 连线编码消息。AMQP 1.0 wire-encoded message.

计划消息Schedule Message

计划消息。Schedules messages. 此操作支持事务。This operation supports transaction.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:schedule-message
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
messagesmessages 映射列表list of maps Yes 消息列表,其中每个映射表示一条消息。List of messages in which every map represents a message.

代表消息的映射必须包含以下条目:The map representing a message must contain the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
message-idmessage-id stringstring Yes amqpMessage.Properties.MessageId 为字符串amqpMessage.Properties.MessageId as string
session-idsession-id stringstring No amqpMessage.Properties.GroupId as string
partition-keypartition-key stringstring No amqpMessage.MessageAnnotations."x-opt-partition-key"
via-partition-keyvia-partition-key stringstring No amqpMessage.MessageAnnotations."x-opt-via-partition-key"
messagemessage 字节的数组array of byte Yes AMQP 1.0 连线编码消息。AMQP 1.0 wire-encoded message.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败。200: OK - success, otherwise failed.
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

响应消息正文必须包含 amqp-value 部分,其中所含映射必须包括以下条目:The response message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
sequence-numberssequence-numbers 长整数的数组array of long Yes 计划消息的序列号。Sequence number of scheduled messages. 序列号用于取消。Sequence number is used to cancel.

取消计划消息Cancel Scheduled Message

取消计划消息。Cancels scheduled messages.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:cancel-scheduled-message
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
sequence-numberssequence-numbers 长整数的数组array of long Yes 要取消的计划消息的序列号。Sequence numbers of scheduled messages to cancel.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败。200: OK - success, otherwise failed.
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

会话操作Session Operations

会话续订锁Session Renew Lock

按实体描述中指定的时间延长消息锁。Extends the lock of a message by the time specified in the entity description.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:renew-session-lock
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
session-idsession-id stringstring Yes 会话 ID。Session ID.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 有更多消息200: OK - has more messages

204:无内容 - 没有更多消息204: No content - no more messages
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

响应消息正文必须包含 amqp-value 部分,其中所含映射必须包括以下条目:The response message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
expirationexpiration timestamptimestamp Yes 新到期日。New expiration.

速览会话消息Peek Session Message

在不锁定的情况下速览会话消息。Peeks session messages without locking.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:peek-message
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
from-sequence-numberfrom-sequence-number longlong Yes 从其开始速览的序列号。Sequence number from which to start peek.
message-countmessage-count intint Yes 要速览的消息数量的上限。Maximum number of messages to peek.
session-idsession-id stringstring Yes 会话 ID。Session ID.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 有更多消息200: OK - has more messages

204:无内容 - 没有更多消息204: No content - no more messages
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

响应消息正文必须包含 amqp-value 部分,其中所含映射必须包括以下条目:The response message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
messagesmessages 映射列表list of maps Yes 消息列表,其中每个映射表示一条消息。List of messages in which every map represents a message.

代表消息的映射必须包含以下条目:The map representing a message must contain the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
messagemessage 字节的数组array of byte Yes AMQP 1.0 连线编码消息。AMQP 1.0 wire-encoded message.

设置会话状态Set Session State

设置会话的状态。Sets the state of a session.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:set-session-state
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
session-idsession-id stringstring Yes 会话 ID。Session ID.
session-statesession-state 字节的数组array of bytes Yes 不透明的二进制数据。Opaque binary data.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败200: OK - success, otherwise failed
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

获取会话状态Get Session State

获取会话的状态。Gets the state of a session.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:get-session-state
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
session-idsession-id stringstring Yes 会话 ID。Session ID.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败200: OK - success, otherwise failed
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

响应消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The response message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
session-statesession-state 字节的数组array of bytes Yes 不透明的二进制数据。Opaque binary data.

枚举会话Enumerate Sessions

消息传送实体上的枚举会话。Enumerates sessions on a messaging entity.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:get-message-sessions
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
last-updated-timelast-updated-time timestamptimestamp Yes 筛选,以便仅包含在给定时间后更新的会话。Filter to include only sessions updated after a given time.
skipskip intint Yes 跳过会话数量。Skip a number of sessions.
toptop intint Yes 会话数量的上限。Maximum number of sessions.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 有更多消息200: OK - has more messages

204:无内容 - 没有更多消息204: No content - no more messages
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

响应消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The response message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
skipskip intint Yes 状态代码为 200 时的已跳过会话的数量。Number of skipped sessions if status code is 200.
sessions-idssessions-ids 字符串的数组array of strings Yes 状态代码为 200 时的会话 ID 的数组。Array of session IDs if status code is 200.

规则操作Rule operations

添加规则Add Rule

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:add-rule
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
rule-namerule-name stringstring Yes 规则名称,不包括订阅和主题名称。Rule name, not including subscription and topic names.
rule-descriptionrule-description mapmap Yes 如下一部分中指定的规则描述。Rule description as specified in next section.

rule-description 映射必须包含以下条目,其中 sql-filtercorrelation-filter 互斥:The rule-description map must include the following entries, where sql-filter and correlation-filter are mutually exclusive:

Key 值类型Value Type 必须Required 值内容Value Contents
sql-filtersql-filter mapmap Yes sql-filter,如下一部分中所指定。sql-filter, as specified in the next section.
correlation-filtercorrelation-filter mapmap Yes correlation-filter,如下一部分中所指定。correlation-filter, as specified in the next section.
sql-rule-actionsql-rule-action mapmap Yes sql-rule-action,如下一部分中所指定。sql-rule-action, as specified in the next section.

sql-filter 映射必须包含以下条目:The sql-filter map must include the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
expressionexpression stringstring Yes Sql 筛选器表达式。Sql filter expression.

correlation-filter 映射至少必须包含以下条目之一:The correlation-filter map must include at least one of the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
correlation-idcorrelation-id stringstring No
message-idmessage-id stringstring No
toto stringstring No
reply-toreply-to stringstring No
labellabel stringstring No
session-idsession-id stringstring No
reply-to-session-idreply-to-session-id stringstring No
content-typecontent-type stringstring No
propertiesproperties mapmap No 映射到服务总线 BrokeredMessage.PropertiesMaps to Service Bus BrokeredMessage.Properties.

sql-rule-action 映射必须包含以下条目:The sql-rule-action map must include the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
expressionexpression stringstring Yes Sql 操作表达式。Sql action expression.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败200: OK - success, otherwise failed
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

删除规则Remove Rule

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:remove-rule
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
rule-namerule-name stringstring Yes 规则名称,不包括订阅和主题名称。Rule name, not including subscription and topic names.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败200: OK - success, otherwise failed
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

获取规则Get Rules

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:enumerate-rules
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
toptop intint Yes 要在页面中提取的规则数量。The number of rules to fetch in the page.
skipskip intint Yes 要跳过的规则数量。The number of rules to skip. 定义规则列表中的起始索引 (+1)。Defines the starting index (+1) on the list of rules.

响应Response

响应消息包含以下属性:The response message includes the following properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败200: OK - success, otherwise failed
规则rules 映射数组array of map Yes 规则数组。Array of rules. 每个规则均由一个映射表示。Each rule is represented by a map.

数组中的每个映射条目都包含以下属性:Each map entry in the array includes the following properties:

Key 值类型Value Type 必须Required 值内容Value Contents
rule-descriptionrule-description 所描述对象的数组array of described objects Yes 带有 AMQP 的 com.microsoft:rule-description:list 描述了代码 0x0000013700000004com.microsoft:rule-description:list with AMQP described code 0x0000013700000004

com.microsoft.rule-description:list 是所描述对象的数组。com.microsoft.rule-description:list is an array of described objects. 此数组包括以下内容:The array includes the following:

索引Index 值类型Value Type 必须Required 值内容Value Contents
00 所描述对象的数组array of described objects Yes filter 如下所述。filter as specified below.
11 所描述对象的数组array of described object Yes ruleAction 如下所述。ruleAction as specified below.
22 stringstring Yes 规则名称。name of the rule.

filter 可以是以下任一类型:filter can be of either of the following types:

描述符名称Descriptor Name 描述符代码Descriptor code ValueValue
com.microsoft:sql-filter:list 0x0000013700000060x000001370000006 SQL 筛选器SQL filter
com.microsoft:correlation-filter:list 0x0000013700000090x000001370000009 关联筛选器Correlation filter
com.microsoft:true-filter:list 0x0000013700000070x000001370000007 True 筛选器表示 1=1True filter representing 1=1
com.microsoft:false-filter:list 0x0000013700000080x000001370000008 False 筛选器表示 1=0False filter representing 1=0

com.microsoft:sql-filter:list 是描述数组,它包括:com.microsoft:sql-filter:list is a described array which includes:

索引Index 值类型Value Type 必须Required 值内容Value Contents
00 stringstring Yes SQL 筛选表达式Sql Filter expression

com.microsoft:correlation-filter:list 是描述数组,它包括:com.microsoft:correlation-filter:list is a described array which includes:

索引(如果存在)Index (if exists) 值类型Value Type 值内容Value Contents
00 stringstring 相关性 IDCorrelation ID
11 stringstring 消息 IDMessage ID
22 stringstring 如果To
33 stringstring 回复Reply To
44 stringstring LabelLabel
55 stringstring 会话 IDSession ID
66 stringstring 会话 ID 回复Reply To Session ID
77 stringstring 内容类型Content Type
88 映射Map 定义属性的应用程序的映射Map of application defined properties

ruleAction 可以是以下任一类型:ruleAction can be either of the following types:

描述符名称Descriptor Name 描述符代码Descriptor code ValueValue
com.microsoft:empty-rule-action:list 0x00000137000000050x0000013700000005 空规则操作 - 不存在任何规则操作Empty Rule Action - No rule action present
com.microsoft:sql-rule-action:list 0x00000137000000060x0000013700000006 SQL 规则操作SQL Rule Action

com.microsoft:sql-rule-action:list 是一个所描述对象的数组,其第一个条目是包含 SQL 规则操作表达式的字符串。com.microsoft:sql-rule-action:list is an array of described objects whose first entry is a string which contains the SQL rule action's expression.

延迟的消息操作Deferred message operations

按序列号接收Receive by sequence number

按序列号接收延迟的消息。Receives deferred messages by sequence number.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:receive-by-sequence-number
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
sequence-numberssequence-numbers 长整数的数组array of long Yes 序列号。Sequence numbers.
receiver-settle-modereceiver-settle-mode ubyteubyte Yes AMQP 核心 v1.0 中指定的“接收方结算” 模式。Receiver settle mode as specified in AMQP core v1.0.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败200: OK - success, otherwise failed
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

响应消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The response message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
messagesmessages 映射列表list of maps Yes 消息列表,其中每个映射表示一条消息。List of messages where every map represents a message.

代表消息的映射必须包含以下条目:The map representing a message must contain the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
lock-tokenlock-token uuiduuid Yes receiver-settle-mode 为 1 时的锁令牌。Lock token if receiver-settle-mode is 1.
messagemessage 字节的数组array of byte Yes AMQP 1.0 连线编码消息。AMQP 1.0 wire-encoded message.

更新处置状态Update disposition status

更新延迟消息的处置状态。Updates the disposition status of deferred messages. 该操作支持事务。This operation supports transactions.

请求Request

请求消息必须包含以下应用程序属性:The request message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
operationoperation 字符串string Yes com.microsoft:update-disposition
com.microsoft:server-timeout uintuint No 操作服务器超时以毫秒为单位。Operation server timeout in milliseconds.

请求消息正文必须包含 amqp-value 部分,其中所含 映射 必须包括以下条目:The request message body must consist of an amqp-value section containing a map with the following entries:

Key 值类型Value Type 必须Required 值内容Value Contents
disposition-statusdisposition-status stringstring Yes 已完成completed

已放弃abandoned

已挂起suspended
lock-tokenslock-tokens uuid 的数组array of uuid Yes 用于更新处置状态的消息锁令牌。Message lock tokens to update disposition status.
deadletter-reasondeadletter-reason stringstring No 如果处置状态设置为 已挂起,可进行设置。May be set if disposition status is set to suspended.
deadletter-descriptiondeadletter-description stringstring No 如果处置状态设置为 已挂起,可进行设置。May be set if disposition status is set to suspended.
properties-to-modifyproperties-to-modify mapmap No 要修改的服务总线中转消息属性的列表。List of Service Bus brokered message properties to modify.

响应Response

响应消息必须包含以下应用程序属性:The response message must include the following application properties:

Key 值类型Value Type 必须Required 值内容Value Contents
statusCodestatusCode intint Yes HTTP 响应代码 [RFC2616]HTTP response code [RFC2616]

200:正常 - 成功,其他表示失败200: OK - success, otherwise failed
statusDescriptionstatusDescription stringstring No 状态的说明。Description of the status.

后续步骤Next steps

若要详细了解 AMQP 和服务总线,请单击以下链接:To learn more about AMQP and Service Bus, visit the following links: