OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0

所需积分/C币:10 2016-03-14 11:09:16 742KB PDF
66
收藏 收藏
举报

ISO/IEC组织定义的AMQP协议的标准规范。目前版本号为version 1.0
Notices Copyright C) OASIS Open 2012. All Rights Reserved All capitalized terms in the following text have the meanings assigned to them in the oasis Intellectual Property Rights Policy (the"OASIS IPR Policy). The full Policy may be found at the Oasis website This document and translations of it may be copied and furnished to others and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an oasis Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed )or as required to translate it into languages other than english The limited permissions granted above are perpetual and will not be revoked by OASiS or its successors or assigns This document and the information contained herein is provided on an"As Is" basis and OASIS DISCLAIMS ALL WAR RANTIES. EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFOR MATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABIL ITY OR FITNESS FOR A PARTICULAR PURPOSE OASIS requests that any OaSiS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Committee Specification or OASiS Standard, to notify oaSis Tc Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this specification by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the iPr mode of the oasis Technical Committee that produced thi specification. OASIS may include such claims on its website, but disclaims any obligation to do so OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights Information on OASIS procedures with respect to rights in any document or deliverable produced by an oaSis Technical Committee can be found on the oAsis website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this oasis Committee Specification or oAsiS Standard, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims The name"OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifi cationswhilereservingtherighttoenforceitsmarksagainstmisleadingusesPleaseseehttp://www.oasis-open.org olicies-guidelines/trademark for above guidance amgp-core-complete-v1.0-cos01 07 August 2012 Standards Track Work Product Copyright C OASIS Open 2012. All Rights Reserved Page 2 of 124 Contents 0 Overview 0.1 Introduction 0. 1. 1 Terminology 0.1.2 Normative references 0.1.3 Non-normative references 9 0.2 Conformance 10 0.3 Acknowledgements 0.4 Revision History 13 1 Types 16 Type System 1.1.1 Primitive Types 1.1.2 Described Types 1.1.3 Composite Types 1.1. 4 Restricted Types 17 2 Type Er 1.2.1 Fixed Width 19 1.2.2 Variable width 20 123C 20 124Ar 20 1.3 Type Notation 21 1 Primitive Type Notation 21 1.3.2 Composite Type Notation 1.3.3 Descriptor Notation 1.3.4 Field Notation 1.3.5 Restricted Type Notation 2 1.4 Composite Type representation 24 1.5 Descriptor Values 1.6 Primitive Type Definitions 25 1.6.1nu11 1.6.2 boolean 1.6.3 ubyt 26 1.6.4 26 1.6.5 uint 26 1.6.6 ulong 1.6.7b 26 1.6.8 short 27 1.6.9 int 27 1.6.10 1.6.11f10at 27 1.6.12 double 2 1.6.13 decima132 1.6.14 decima164 1.6.15 decima1128.., 28 1.6.16 28 1.6. 17 timestamp 1.6.18uuid 1.6. 19 binary 29 1.6.20 string 29 amgp-core-complete-v1.0-cos01 07 August 2012 Standards Track Work Product Copyright C OASIS Open 2012. All Rights Reserved Page 3 of 124 1.6.2 bol 29 1.6.221is 29 1.6.23ma 1.6.24 array 2 Transport 31 2.1 Transport 31 2.1.1 Conceptual mod 31 2.1.2 Communication Endpoints 2.1.3 Protocol Frames 2.2 Version Negotiation 2.3 Framing 2.3. 1 Frame Layout .37 2.3.2 AMQP Frames 2.4 Connections 2.4.1 Opening A Connection 2.4.2 Pipelined Open 4.3 Closing A Connection 40 24,4 Simultaneous close 40 2.45 dle Timeout of a connection 41 24.6 Connection state 41 2.4.7 Connection State diagram 2.5 Sessions 2.5.1 Establish A Session 2.5.2 Ending A Session 2.5.3 Simultaneous end 2.5. 4 Session Errors 2.5.5 Session States 2.5.6 Session Flow Control 2.6 Links g 2.6. 1 Naming A Link 2.6.2 Link Handles 49 2.6.3 Establishing Or Resuming a Link 49 2.6.4 Detaching And Reattaching A Link 2.6.5 Link errors 52 2.6.6 Closing A Link 53 2.6.7 Flow control 2.6.8 Synchronous Get 2.6.9 Asynchronous Notification 2.6. 10 Stopping a link 2.6.11 Messages 2.6.12 Transferring A Message 2.6. 13 Resuming Deliveries 60 2.6. 14 Transferring Large Messages 61 2.7 Performatives 2.7.1 Open .62 2.7.2 Begin 2.7.3 Attach 2.7.4 Flow 67 2.7.5 transfe 6 2.7.6 Disposition 2.7.7 Detach 2.7.8 End 2.7.9Cose.. 912233 7 2.8 Definitions amgp-core-complete-v1.0-cos01 07 August 2012 Standards Track Work Product Copyright C OASIS Open 2012. All Rights Reserved Page 4 of 124 2.8.1Ro|e 2.8.2 Sender Settle Mode 73 2.8.3 Receiver Settle Mode 74 2.8.4 Handle 74 2.8.5 Seconds 74 2.8.6 Milliseconds 74 2.8.7 Delivery Tag 2.8. 8 Delivery Number 2.89 Transfer number 2.8.10 Sequence No 2.8. 1 1 Message Format 2.8. 12 IETF Language Tag 2.8.13Feds 5556 2.8.14Eror 2.8.15 AMQP Error 76 2.8. 16 Connection Error 77 2.8.17 Session Error 78 2.8. 18 Link Error 78 2.8. 19 Constant Definitions 79 3 Messaging 81 3.1 Introduction 3.2 Message Format 3.2.1 Header 3.2.2 Delivery Annotations 3.2.3 Message Annotations 3.2.4 Properties 3.2.5 Application Properties 8888888888 6 3.2.6 Data 3.2.7 AMQP Sequence 3.2.8 AMQP Value 3.2.9 Footer 3.2.10 Annotations 87 3.2. 11 Message ID ULong 87 3.2.12 Message ID UUID 87 3.2. 13 Message ID Binary 87 3.2. 14 Message ID String 87 3.2.15 Address String 87 3.2.16 Constant Definitions 87 3.3 Distribution Nodes 88 3. 4 Delivery State 88 3.4.1 Received 3.4.2 Accepted 89 3.4.3 Rejected 90 3.4.4 Released 3.4.5 Modified 3.4.6 Resuming Deliveries Using Delivery States 91 3.5 Sources and Targets 95 3.5. 1 Filtering Messages 3.5.2 Distribution modes 3.5.3 Source 3.5. 4 Target 97 3.5.5 Terminus Durability 3.5.6 Terminus Expiry Polic 3.5.7 Standard Distribution Mode 99 amgp-core-complete-v1.0-cos01 07 August 2012 Standards Track Work Product Copyright C OASIS Open 2012. All Rights Reserved Page 5 of 124 3.5.8 Filter Set 100 3.5.9 Node Properties 100 3.5.10 Delete On Close 100 3.5.11 Delete On No links ..100 3.5. 12 Delete On No Messages 101 3.5. 13 Delete On No Links Or Messages 10 4 Transactions 102 4.1 Transactional Messaging 102 4.2 Declaring a Transaction 102 4. 3 Discharging a Transaction .....103 4.4 Transactional Work 104 4.4.1 Transactional Posting 104 4.4.2 Transactional Retirement 105 4.4.3 Transactional Acquisition 106 4.4.4 Interaction Of Settlement With Transactions 107 4.4.4.1 Transactional Posting 107 44. 42 Transactional retirement ,,,108 4.4.4.3 Transactional Acquisition 108 4.5 Coordination 108 4.5.1 Coordinator 108 4.5.2 Declare 4.5.3 Discharge 109 4.5. 4 Transaction ID 110 4.5.5 Declared 110 4.5.6 Transactional State 110 4.5.7 Transaction Capability 4.5.8 Transaction Error 5 Security 112 5.1 Security Layers 112 5.2 TlS 112 5.2.1 Alternative Establishment 113 5.2.2 Constant Definitions 113 5.3 SASL 113 5.3.1 SASL Frames 114 5.3. 2 SASL Negotiation 114 5.3. 3 Security Frame Bodies 115 5.3.3.1 SASL Mechanisms 115 5.3.3.2 SASL Init 115 5.3. 3.3 SASL Challenge 116 5.3.3.4 SASL Response 116 5.3.3.5 SASL Outcome 117 5.3.3.6 SASL Code 117 5.3, 4 Constant definitions 117 XML Document Type Definition(DTD) 19 amgp-core-complete-v1.0-cos01 07 August 2012 Standards Track Work Product Copyright C OASIS Open 2012. All Rights Reserved Page 6 of 124 PART O. OVERVIEW Part 0: Overview 0.1 Introduction The Advanced Message Queuing Protocol is an open internet protocol for business messaging AMQP is comprised of several layers. The lowest level defines an efficient, binary, peer-to-peer protocol for transporting messages between two processes over a network. Above this, the messaging layer defines an abstract message format, with concrete standard encoding. Every compliant AMQP process MUst be able to end and receive messages in this standard encoding 0.1.1 Terminology The key words " MUST",“ MUST NOT," REQUIRED",“ SHALL,"“ SHALL NOT":“ SHOULD:"SH○ ULD NOT RECOMMENDED, MAY, and "OPTioNAL" in this specification are to be interpreted as described in IETF RFc2119[RFc2119 The authoritative form of the AmQP specification consists of a set of XML source documents. These documents are transformed into PDF and HTML representations for readability. The machine readable version of the AMQP dtd describes the xml used for the authoritative source documents. this dtd includes the definition of the syntax used in the excerpts of XML presented in the PDF and HTML representations 0.1.2 Normative References [ASCII American National Standards Institute, Inc, American National Standard for Information Systems, Coded char- acter Sets-7-Bit American National Standard Code for information Interchange (7-Bit ASCH), ANSI X3.4-1986 March 26, 1986 [BCP47 A. Phillips, Ed, M. Davis, Ed, Tags for Identifying Languages. IETF BCP: 47, September 2009 http://www.ietf.org/rfc/bcp/bcp47.txt [anaHttpParamS] IaNa(iNternetAssignedNumbersauthority),HypertextTransferProtocol(http)parameters http://www.iana.org/assignments/http-parameters/http-parameters.xm1 [ANAPEN] lANA (Internet Assigned Numbers authority), Private Enterprise Numbers http://www.iana.org/assignments/enterprise-numbers [ANASUBTAG] lANA Internet Assigned Numbers Authority), Language Subtag Registr http://www.iana.org/assignments/language-subtag-registry [IEEE754 Standard for Floating-Point Arithmetic. IEEE 754-2008, August 2008 http://ieeexplore.ieee.org/servlet/opac?punumber=4610933 [EEE1003] The Single UNIX Specification, Version 4. IEEE Std 1003. 1-2008, December 2008 http://www.unix.org/version4/ amgp-core-complete-v1.0-cos01 07 August 2012 Standards Track Work Product Copyright C OASIS Open 2012. All Rights Reserved Page 7 of 124 PART O. OVERVIEW 0. 1 Introduction RFC1982 R ElZ, R Bush, Serial Number ArithmetiC. IETF RFC 1982, August 1996 http://www.ietf.org/rfc/rfc1982.txt [RFC2046 N Freed, N. Borenstein, Multipurpose internet Mail Extensions(MIME) Part TwO: Media types. IETF RFC 2046 November 1996 http://www.ietf.org/rfc/rfc2046 RFc2119] S Bradner, Key words for use in RFCs to Indicate Requirement Levels. IETF RFC 2119, March 1997 http://www.ietf.org/rfc/rfc2119.txt RFc22341 D. Crocker, Ed, P. Overell, Augmented BNF for Syntax Specifications: ABNF. IETF RFC 2234, November 199 http://www.ietf.org/rfc/rfc2234.txt [RFc2616] R. Fielding, J. Gettys, J. Mogul, H. Frystyk, L Masinter, P. Leach, T. Berners-Lee, Hypertext Transfer Protocol Http/1.1. Ietf Rfc 2616. June 1999 http://www.ietf.org/rfc/rfc2616.tx [RFc4122] P. Leach, M. Mealling, R Salz, A Universally Unique IDentifier(UUID)URN Namespace. IETF RFC 4122, July 2005 http://www.ietf.org/rfc/rfc4122.txt RFc43661 S. Blake-Wilson, M. Nystrom, D. Hopwood, J. Mikkelsen, T. Wright, Transport Layer Security(TLS) EXtensions IETF RFC 4366, April 2006 http://www.ietf.org/rfc/rfc4366.txt [RFC4422 A Melnikov, Ed, K. Zeilenga, Ed, Simple Authentication and Security layer (SASL). IETF RFC 4422, June 2006 http://www.ietf.org/rfc/rfc4422.txt [RFc4616] K. Zeilenga, Ed, The PLaIN Simple Authentication and Security Layer(SASL) Mechanism. IETF RFC 4616 August 2006 http://www.ietf.org/rfc/rfc4616.txt [RFc5246] T. Dierks, E Rescorla, The Transport Layer Security (TLS) Protocol Version 1. 2. IETF RFC 5246, August 2008 http://www.ietf.org/rfc/rfc5246.txt [RFc5646] A. Phillips, Ed, M.Davis, Ed, Tags for identifying Languages. IETF RFC 5646, September 2009. http://www.ietf.org/rfc/rfc5646.txt [RFc5802 (SCRAM)SASL and GSS-AP/ Mechanisms. IETF RFC 5802, July 201e Response Authentication Mechanism C. Newman, A. Menon-Sen, A Melnikov, N. Williams, Salted Challeng http://www.ietf.org/rfc/rfc5802.txt TUNICODE6 The Unicode Consortium. The Unicode Standard, Version 6.0.0, Mountain view CA: The Unicode Consortium 2011.SBN978-1-93621301-6) http://www.unicode.org/versions/unicode6.0.0/ amgp-core-complete-v1.0-cos01 07 August 2012 Standards Track Work Product Copyright C OASIS Open 2012. All Rights Reserved Page 8 of 124 PART O. OVERVIEW 0. 1 Introduction 0.1.3 Non-normative references [AMQPCONNCAP AMQP Capabilities Registry: Connection Capabilities http://www.amqp.org/specification/1.0/connection-capabilities TAMQPCONNPROP AMQP Capabilities Registry: Connection Properties http://www.amqp.org/specification/1.0/conmection-properties TAMQPDELANNI AMQP Capabilities Registry: Delivery Annotations http://www.amqp.org/specification/1.0/delivery-annotations TAMQPDISTMODE] AMQP Capabilities Registry: Distribution Modes http://www.amqp.org/specification/1.0/distribution-modes [AMQPFILTERS] AMQP Capabilities Registry: Filters http://www.amqp.org/specification/1.0/filters [AMQPFOOTER AMQP Capabilities Registry Footer http://www.amqp.org/specification/1.0/footer [AMQPLINKCAP AMQP Capabilities Registry: Link Capabilities http://www.amqp.org/specification/1.0/link-capabilities TAMQPLINKPROP AMQP Capabilities Registry: Link Properties http://www.amqp.org/specification/1.0/link-properties [AMQPLINKSTATEPROP] AMQP Capabilities Registry: Link State Properties http://www.amqp.org/specification/1.0/link-state-properties AMQPMESSANN AMQP Capabilities Registry: Message Annotations http://www.amqp.org/specification/1.0/message-annotations [AMQPNODEPROP AMQP Capabilities Registry: Node Properties http://www.amqp.org/specification/1.0/node-properties [AMQPSESSCAPI AMQP Capabilities Registry: Session Capabilities http://www.amqp.org/specification/1.0/session-capabilities [AMQPSESSPROP AMQP Capabilities Registry Session Properties http://www.amqp.org specification/1. 0/session-properties [AMQPSOURCECAP AMQP Capabilities Registry: Source Capabilities http://www.amqp.org/specification/1.0/source-capabilities AMQPTARGETCAP AMQP Capabilities Registry: Target Capabilities http://www.amqp.org/specification/1.0/target-capabilities amgp-core-complete-v1.0-cos01 07 August 2012 Standards Track Work Product Copyright C OASIS Open 2012. All Rights Reserved Page 9 of 124

...展开详情
试读 125P OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
  • 图书勋章

    CSDN技术图书作者专属勋章
  • 技术圈认证(专家版)

    博客专家完成年度认证,即可获得
关注 私信 TA的资源
上传资源赚积分or赚钱
    最新推荐
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0 10积分/C币 立即下载
    1/125
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第1页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第2页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第3页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第4页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第5页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第6页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第7页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第8页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第9页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第10页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第11页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第12页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第13页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第14页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第15页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第16页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第17页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第18页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第19页
    OASIS Advanced Message Queueing Protocol (AMQP) Version 1.0第20页

    试读结束, 可继续阅读

    10积分/C币 立即下载 >