Advanced Message Queuing Protocol ( 1 ) 概述
The Advanced Message Queuing Protocol (AMQP)是一个标准开放的应用层的消息中间件(Message Oriented Middleware)协议。AMQP定义了通过网络发送的字节流的数据格式。因此兼容性非常好,任何实现AMQP协议的程序都可以和与AMQP协议兼容的其他程序交互,可以很容易做到跨语言,跨平台。
Development
AMQP由JPMorgan Chase & Co于2006年中旬发布。JPMorgan Chase & Co和iMatix定义协议规范,并由包括Red Hat, Cisco Systems, TWIST, IONA, and iMatix参与开发。截至2009年11月,工作组的成员包括 Bank of America, Barclays, Cisco Systems, Credit Suisse, Deutsche Börse Systems, Envoy Technologies, Inc., Goldman Sachs, Progress Software, iMatix Corporation, JPMorgan Chase Bank Inc. N.A, Microsoft Corporation, Novell, Rabbit Technologies Ltd., Red Hat, Inc., Solace Systems, Tervela Inc., TWIST Process Innovations ltd, WS02 and 29West Inc.
值得一提的是,AMQP的设计目标是建立开放工业标准协议。虽然AMQP的起源于金融服务行业,但是它的用途并不局限于金融行业内。
The AMQP model
分布式模型
AMQP 定义了一系列实体(Entity), 从连接的角度来看, 他们是
Message Broker:连接Client的服务器,他使用AMQP协议与Client交互,并且可以作为集群运行, 但是这些细节并没有写入AMQP的规范。
User: 用户可以连接到Message Broker
Connection: 物理连接, 绑定到用户
Channel:Channel是有状态的逻辑连接。Client连接上执行并行操作应维护不同的Channel。
所有发送和接收的实体(Entity)都在Channel中定义。任何试图声明一个已具名的有不同属性的实体(Entity),都将导致错误。如果需要改变实体(Entity)的属性, 必须先将该实体删除,之后重新定义。实体(Entity)名字必须唯一, Broker根据实体(Entity)名字来判断Client的操作权限。
Exchanges
Exchange 从Client接收消息,并把它们分发到Message Queue
Exchange 的属性
passive: Exchange不必被声明,但是如果不存在,将会产生错误
durable:如果Broker重起,Exchange 是否还有效
auto-delete:只要发现它没有被绑定到Queue,Exchange将被删除。
Queues
Queue用于存放Message,直到有客户端可以处理这个Message。
Queue的属性
alternate-Exchange:当信息被拒绝接收,将转发到这个Exchange,并从Queue中删除。
passive: Queue 不必被声明, 但是如果不存在, 将会产生错误
durable:如果Broker重起,Queue 是否还有效
exclusive:只能有一个Client一个具体的Queue。
auto-delete:如果Queue未被订阅, 则自动删除Queue
Messages
Message一律不具名,并被发送到Exchange。它们由一个Message header和Message content的构成。body是一个包含若干可选的属性的不可见的Message header:
routing-key:这个属性取决于Exchange的类型
immediate:如果Message不能立即被处理, 则将其视为unroutable
delivery-mode:表明该Message是否需要持久保存。
priority:Message的优先级
expiration:Message多久之后失效, 之后将作为unroutable处理
Bindings
Binding 是一个Queue和Exchange的逻辑绑定,并指定一个Message如何从Exchange发送到Queue。
Unconditional :请求Exchange的所有的Message。
Conditional on a fixed string :请求Exchange上具有指定routing key的所有Message
Conditional on a pattern match : 请求Exchange上具有指定routing key, 并且符合指定pattern的所有Message
Conditional on multiple fixed strings:请求Exchange上属性符合要求的所有Message
Conditional on multiple fixed strings:请求Exchange上模式符合要求的所有Message
Conditional on algorithmic comparison:请求Exchange上符合算法要求的所有Message
Conditional on content inspection:请求Exchange上内容符合要求的所有Message
Implementations
These are the known publicly available AMQP implementations:
OpenAMQ, original open-source implementation of AMQP, written in C by iMatix. Runs on Linux, AIX, Solaris, Windows, OpenVMS. Includes Broker, APIs in C/C++ and Java JMS, remote admin shell, scripting, federation, failover, and AMQP-over-HTTP via the RestMS protocol.
Apache Qpid, a project in the Apache Foundation with Client APIs that support C++, Ruby, Java, JMS, Python and .NET.
Red Hat Enterprise MRG implements the latest version of AMQP 0-10 providing rich set of features like full management, federation, Active-Active clustering using Qpid as upstream, adds a web console and many enterprise features and "C++, Ruby, Java, JMS, Python .NET" Clients.
RabbitMQ, an independent open-source implementation. The server is written in Erlang, and multiple Clients including Python, Ruby, .NET, Java, JMS, C, PHP, Actionscript, XMPP, STOMP, and AJAX are provided. RabbitMQ is distributed with Ubuntu, FreeBSD ports.
AMQP Infrastructure yum installable AMQP 0-10 (maintained in the latest 3 versions of Fedora) which includes the Broker, management tools, agents and Clients.
ØMQ, a high-performance messaging platform that is able to treat AMQP-compliant Brokers as nodes in distributed messaging network.
Zyre, a Broker that implements RestMS and AMQP to provide RESTful HTTP access to AMQP networks.
reference:
http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol
http://www.cnblogs.com/slime/archive/2009/11/18/1598765.html
Advanced Message Queuing Protocol ( 1 ) 概述的更多相关文章
- AMQP(Advanced Message Queuing Protocol)
一套确定的消息交换功能,也就是“高级消息交换协议模型”.AMQP模型包括一套用于路由和存储消息的功能模块,以及一套在这些模块之间交换消息的规则. 一个网络线级协议(数据传输格式),客户端应用可以通过这 ...
- Methods for Using Message Queuing Telemetry Transport for Sensor Networks to Support Sleeping Devices
Methods support a sleep mode for an embedded device. Embedded devices like sensors and actuators use ...
- RabbitMQ是一个由erlang开发的基于AMQP(Advanced Message Queue )协议的开源实现。
RabbitMQ是一个由erlang开发的基于AMQP(Advanced Message Queue )协议的开源实现. 1. 介绍 RabbitMQ是一个由erlang开发的基于AMQP(Advan ...
- Message Queuing(MSMQ)
一.前言 MicroSoft Message Queuing(微软消息队列)是在多个不同的应用之间实现相互通信的一种异步传输模式,相互通信的应用可以分布于同一台机器上,也可以分布于相连的网络空间中的任 ...
- Internet Message Access Protocol --- IMAP协议
https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol Internet Message Access Protocol
- 服务信息块协议 SMB(Server Message Block protocol)
SMB(Server Message Block)是协议名,它能被用于Web连接和客户端与服务器之间的信息沟通. SMB协议 SMB最初是IBM的贝瑞·费根鲍姆(Barry Feigenbaum)研制 ...
- POP and IMAP - Post Office Protocol and Internet Message Access Protocol
POP and IMAP - Post Office Protocol and Internet Message Access Protocol 用来从 SMTP Server 上下载邮件的协议. P ...
- AMQP 0-9-1 Model Explained Why does the queue memory grow and shrink when publishing/consuming? AMQP和AMQP Protocol的是整体和部分的关系 RabbitMQ speaks multiple protocols.
AMQP 0-9-1 Model Explained — RabbitMQ http://next.rabbitmq.com/tutorials/amqp-concepts.html AMQP 0-9 ...
- Understanding AMQP, the protocol used by RabbitMQ--reference
RabbitMQ is a lightweight, reliable, scalable and portable message broker. But unlike many message b ...
随机推荐
- openlayers 添加标记点击弹窗 定位图标闪烁
环境vue3.0 ,地图为公用组件,将添加图标标记的方法放在公共地图的初始化方法里 同一时间弹窗和定位标识都只有一个,因而我把弹窗和定位标记的dom预先写好放到了页面 //矢量标注样式设置函数,设置i ...
- 配置ShiroFilter需要注意的问题(Shiro_DelegatingFilterProxy)
ShiroFilter的工作原理 ShiroFilter:DelegatingFilterProxy作用是自动到Spring 容器查找名字为shiroFilter(filter-name)的bean并 ...
- Spring Framework Part3 IoC and Dynamic Proxy
spring serious of blog edit by 马士兵教育 Maven方式创建Spring工程 工程创建 1.新建项目 选择Maven Project 2.勾选 Create a sim ...
- iOS消息通知Notification的用法
1.发送消息 NSNotification *notification = [NSNotification notificationWithName:@"selectPosition&quo ...
- iOS 自定义NavigationBar右侧按钮rightBarButtonItem
自定义右侧的一个按钮 UIBarButtonItem *myButton = [[UIBarButtonItem alloc] initWithTitle:@"主页" style: ...
- Kotlin使用率达35%,Java要退位了?
在今年的Google I/O大会上,关于Kotlin,Google只说了只言片语: 在过去一年里,有35%的专业Android开发者在使用Kotlin,其中95%的开发者都对Kotlin非常满意. 之 ...
- 【java工具类】POI导出excel
POI的maven依赖:<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi&l ...
- vscode 代码缩进2格
"editor.detectIndentation":false,
- FP回写阶段卡住或报错
FP在autosap阶段往往会因各种各样的因素导致回写报错,卡住等异常: 本次由于一个视图的性能突然下降导致回写长期卡住没有完成: 这时如果要重新执行回写的话就要检查哪部分的数据回写到SAP端,一般有 ...
- [BZOJ1902]:[NOIP2004]虫食算(搜索)
题目传送门 题目描述 所谓虫食算,就是原先的算式中有一部分被虫子啃掉了,需要我们根据剩下的数字来判定被啃掉的字母. 来看一个简单的例子: 43#98650#45+8468#6633=444455069 ...