Apache ActiveMQ

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(图集)
 
(未显示1个用户的22个中间版本)
第1行: 第1行:
 +
{{top news}}
 +
{{SeeWikipedia}}
 +
 
ActiveMQ is an Apache 2.0 licensed open source Message Broker with full support for JMS 1.1 and JCA
 
ActiveMQ is an Apache 2.0 licensed open source Message Broker with full support for JMS 1.1 and JCA
  
目前ActiveMQ转入Apache基金会, 成为正在孵化的一个项目。
+
相关项目: [[Apache Qpid]]
 
+
==ActiveMQ 5==
[[Image:ActiveMQ-BrokerDiagram-1.png]]
+
new features
 
+
*AMQ Message Store (Faster Persistence!)
==功能==
+
*Message Cursors (To handle very large number of stored messages)
 +
*Blob Messages
 +
*Command Agent
 +
*Enterprise Integration Patterns via Camel Integration
 +
*Logging a warning if you forget to start a Connection
 +
*Message Transformation
 +
apache-activemq-5.2.0\bin\activemq-admin.bat start
 +
http://localhost:8161/admin/
 +
http://localhost:8161/demo/
 +
http://localhost:8161/fileserver/
 +
cd example
 +
ant producer // 发送2000个消息, No Persistence
 +
ant consumer // 接收2000个消息, 队列变空
 +
==ActiveMQ 4==
 
1. fully supports JMS 1.1 and J2EE 1.4
 
1. fully supports JMS 1.1 and J2EE 1.4
 
   完全支持JMS1.1和J2EE1.4规范
 
   完全支持JMS1.1和J2EE1.4规范
第15行: 第31行:
 
   支持Stomp协议,因此基于C, Ruby, Perl, Python, PHP的客户端可以很方便的和ActiveMQ通信
 
   支持Stomp协议,因此基于C, Ruby, Perl, Python, PHP的客户端可以很方便的和ActiveMQ通信
 
3. includes [http://incubator.apache.org/activemq/resource-adapter.html JCA 1.5 resource adaptors] for inbound & outbound messaging so that ActiveMQ should auto-deploy in any J2EE 1.4 compliant server
 
3. includes [http://incubator.apache.org/activemq/resource-adapter.html JCA 1.5 resource adaptors] for inbound & outbound messaging so that ActiveMQ should auto-deploy in any J2EE 1.4 compliant server
   通过JCA1.5(Java Connector Architecture1.5定义了J2EE应用服务器和外部资源,诸如数据库和消息中间件的交互协议)资源适配器来进行消息的接受和发送,因此 ActiveMQ可以自动的部署在任何符合J2EE1.4规范的服务器上
+
   通过JCA1.5(Java Connector Architecture1.5定义了J2EE应用服务器和外部资源,诸如数据库和消息中间件的
 +
交互协议)资源适配器来进行消息的接受和发送,因此 ActiveMQ可以自动的部署在任何符合J2EE1.4规范的服务器上
 
4. tested inside Geronimo, Spring and JBoss 4
 
4. tested inside Geronimo, Spring and JBoss 4
 
   在Geronimo, Spring and JBoss 4上通过了测试
 
   在Geronimo, Spring and JBoss 4上通过了测试
第21行: 第38行:
 
   支持非持久的,持久的,事务的以及XA(X/Open DTP定义的交易中间件与数据库之间的接口规范,用于分布式事务)的消息传递
 
   支持非持久的,持久的,事务的以及XA(X/Open DTP定义的交易中间件与数据库之间的接口规范,用于分布式事务)的消息传递
 
6. supports pluggable [http://incubator.apache.org/activemq/protocols.html transport protocols] such as [http://incubator.apache.org/activemq/how-do-i-use-activemq-using-in-jvm-messaging.html in-VM], TCP, SSL, [http://www.jdon.com/concurrent/nio%D4%AD%C0%ED%D3%A6%D3%C3.htm NIO],UDP, multicast, [http://www.jgroups.org/javagroupsnew/docs/index.html JGroups] and JXTA transports
 
6. supports pluggable [http://incubator.apache.org/activemq/protocols.html transport protocols] such as [http://incubator.apache.org/activemq/how-do-i-use-activemq-using-in-jvm-messaging.html in-VM], TCP, SSL, [http://www.jdon.com/concurrent/nio%D4%AD%C0%ED%D3%A6%D3%C3.htm NIO],UDP, multicast, [http://www.jgroups.org/javagroupsnew/docs/index.html JGroups] and JXTA transports
   支持可插拔的传输协议,例如: in-VM(纯粹在内存中的消息传递), TCP, SSL, NIO(非堵塞技术), UDP(用户数据报协议), multicast(广播), JGroups(扩展于可靠的单播传输机制至多播,它在IP多播的基础上同时提供可靠性和群组功能。) and JXTA(网络编程和计算的平台,用以解决现代分布计算中出现的问题)
+
   支持可插拔的传输协议,例如: in-VM(纯粹在内存中的消息传递), TCP, SSL, NIO(非堵塞技术), UDP(用户数据
 +
报协议), multicast(广播), JGroups(扩展于可靠的单播传输机制至多播,它在IP多播的基础上同时提供可靠性和
 +
群组功能。) and JXTA(网络编程和计算的平台,用以解决现代分布计算中出现的问题)
 
7. supports very fast persistence using JDBC along with a high performance journal
 
7. supports very fast persistence using JDBC along with a high performance journal
 
   通过JDBC和一个高性能的日志(?)实现了消息传递的高速持久化
 
   通过JDBC和一个高性能的日志(?)实现了消息传递的高速持久化
第45行: 第64行:
 
   提供了一个ActiveCluster(用于编写基于集群的应用程序的框架)的实现
 
   提供了一个ActiveCluster(用于编写基于集群的应用程序的框架)的实现
  
另外要注意的就是ActiveMQ支持的文本消息不能超过1M,流消息可以大于1G,当然消息越大,对服务器和带宽的要求就越高。(翻译部分来自 http://elstage.blogspot.com/search/label/ActiveMQ )
+
另外要注意的就是ActiveMQ支持的文本消息不能超过1M,流消息可以大于1G,当然消息越大,对服务器和带宽的要求就越高。
 +
 
 +
(翻译部分来自 http://elstage.blogspot.com/search/label/ActiveMQ )
  
 
==测试==
 
==测试==
第72行: 第93行:
 
     [java] Received: Message: 9 sent at: Mon Aug 28 14:29:43 CST 2006  ...
 
     [java] Received: Message: 9 sent at: Mon Aug 28 14:29:43 CST 2006  ...
 
     [java] Closing connection
 
     [java] Closing connection
 +
 +
==子项目==
 +
*Apollo 下一代ActiveMQ
 +
*CMS (stands for C++ Messaging Service)
 +
*NMS, the .NET Messaging API
 +
 +
==图集==
 +
<gallery widths=100px heights=100px perrow=6>
 +
Image:ActiveMQ-BrokerDiagram-1.png|ActiveMQ
 +
Image:activemq-5.2.png|Web Admin
 +
Image:AMQ-Message-Store.png|消息存储
 +
Image:AMQ-Store-Data-Structure.png|数据结构
 +
Image:ActiveMQ-CPP.png|C++消息服务
 +
Image:kahadb-architecture.gif|KahaDB架构
 +
</gallery>
  
 
==相关链接==
 
==相关链接==
*http://incubator.apache.org/activemq/
+
*http://activemq.apache.org/
*下载 - http://download.huihoo.com/middleware/activemq/
+
*http://download.huihoo.com/apache/activemq/
 +
*http://docs.huihoo.com/apache/activemq/
 +
 
 +
{{Comment}}
  
[[Category:Apache Software Foundation projects]]
+
[[category:Java]]
 +
[[category:Middleware]]
 +
[[category:MOM]]
 +
[[category:Apache]]

2012年5月2日 (三) 09:10的最后版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Apache ActiveMQ Thanks, Wikipedia.

ActiveMQ is an Apache 2.0 licensed open source Message Broker with full support for JMS 1.1 and JCA

相关项目: Apache Qpid

目录

[编辑] ActiveMQ 5

new features

  • AMQ Message Store (Faster Persistence!)
  • Message Cursors (To handle very large number of stored messages)
  • Blob Messages
  • Command Agent
  • Enterprise Integration Patterns via Camel Integration
  • Logging a warning if you forget to start a Connection
  • Message Transformation

apache-activemq-5.2.0\bin\activemq-admin.bat start

http://localhost:8161/admin/
http://localhost:8161/demo/
http://localhost:8161/fileserver/

cd example

ant producer // 发送2000个消息, No Persistence
ant consumer // 接收2000个消息, 队列变空

[编辑] ActiveMQ 4

1. fully supports JMS 1.1 and J2EE 1.4

 完全支持JMS1.1和J2EE1.4规范

2. supports a variety of Cross Language Clients from Java, C, C++, C#, Ruby, Perl, Python, PHP

 支持Java, C, C++, C#, Ruby, Perl, Python, PHP等大多数跨语言的客户端(?)
  • OpenWire for high performance clients in Java, C, C++, C#
 OpenWire(跨语言的交互协议,允许一些语言和平台同ActiveMQ交互)支持基于Java, C, C++, C#的高性能的客户端
  • Stomp support so that clients can be written easily in C, Ruby, Perl, Python, PHP to talk to ActiveMQ
 支持Stomp协议,因此基于C, Ruby, Perl, Python, PHP的客户端可以很方便的和ActiveMQ通信

3. includes JCA 1.5 resource adaptors for inbound & outbound messaging so that ActiveMQ should auto-deploy in any J2EE 1.4 compliant server

 通过JCA1.5(Java Connector Architecture1.5定义了J2EE应用服务器和外部资源,诸如数据库和消息中间件的

交互协议)资源适配器来进行消息的接受和发送,因此 ActiveMQ可以自动的部署在任何符合J2EE1.4规范的服务器上 4. tested inside Geronimo, Spring and JBoss 4

 在Geronimo, Spring and JBoss 4上通过了测试

5. support for transient, persistent, transactional and XA messaging

 支持非持久的,持久的,事务的以及XA(X/Open DTP定义的交易中间件与数据库之间的接口规范,用于分布式事务)的消息传递

6. supports pluggable transport protocols such as in-VM, TCP, SSL, NIO,UDP, multicast, JGroups and JXTA transports

 支持可插拔的传输协议,例如: in-VM(纯粹在内存中的消息传递), TCP, SSL, NIO(非堵塞技术), UDP(用户数据

报协议), multicast(广播), JGroups(扩展于可靠的单播传输机制至多播,它在IP多播的基础上同时提供可靠性和 群组功能。) and JXTA(网络编程和计算的平台,用以解决现代分布计算中出现的问题) 7. supports very fast persistence using JDBC along with a high performance journal

 通过JDBC和一个高性能的日志(?)实现了消息传递的高速持久化

8. designed for high performance clustering, client-server, peer based communication

 被设计用于高性能的集群,客户端-服务器端,基于P2P的消息传递

9. REST API to provide technology agnostic and language neutral web based API to messaging

 REST API(允许网络设备通过HTTP协议的POST和GET来发布和消费消息的API接口)提供了核心技术(?)和基于网络语言的API来进行消息传递

10. Ajax to support web streaming support to web browsers using pure DHTML, allowing web browsers to be part of the messaging fabric

 Ajax支持浏览器只需使用DHTML就可以进行网络流数据的传递,使得浏览器成为消息传递结构的一部分

11. Axis Support so that ActiveMQ can be easily dropped into Apache Axis runtimes to provide reliable messaging

 支持Axis(webservice实现),因此ActiveMQ可以被简单的加入到Apache Axis运行环境,来进行可靠的消息传递

12. Spring Support so that ActiveMQ can be easily embedded into Spring applications and configured using Spring's XML configuration mechanism

 支持Spring,因此ActiveMQ可以简单的和基于Spring框架的应用程序进行绑定,或者使用Spring的XML配置机制

13. can be used as an in memory JMS provider, ideal for unit testing

 可以作为纯内存的JMS提供平台,非常适合单元测试

14. Wildcards support to subscribe to powerful destination hierarchies.

 通配符,有力的支持目标等级订阅

15. Composite Destinations support to allow many destinations to be used in one simple atomic JMS operation

 支持混合目的地,使得发送到多个目的地可以通过一个单一的JMS原子操作来完成

16. JSR 77 / 88 support for easy deployment & management & hot deployment

 支持JSR 77 / 88,实现了简单部署、管理、热部署

17. provides an implementation of ActiveCluster

 提供了一个ActiveCluster(用于编写基于集群的应用程序的框架)的实现

另外要注意的就是ActiveMQ支持的文本消息不能超过1M,流消息可以大于1G,当然消息越大,对服务器和带宽的要求就越高。

(翻译部分来自 http://elstage.blogspot.com/search/label/ActiveMQ )

[编辑] 测试

运行服务

activemq-4.0-SNAPSHOT/bin$ ./activemq

运行生产者

activemq-4.0-SNAPSHOT/example$ ant producer

运行消费者

activemq-4.0-SNAPSHOT/example$ ant consumer

运行结果

consumer:
    [echo] Running consumer against server at $url = tcp://localhost:61616 for subject $subject = TEST.FOO
    [java] Connecting to URL: tcp://localhost:61616
    [java] Consuming queue: TEST.FOO
    [java] Using non-durable subscription
    [java] We are about to wait until we consume: 10 message(s) then we will shutdown
    [java] Received: Message: 0 sent at: Mon Aug 28 14:29:42 CST 2006  ...
    [java] Received: Message: 1 sent at: Mon Aug 28 14:29:42 CST 2006  ...
    [java] Received: Message: 2 sent at: Mon Aug 28 14:29:42 CST 2006  ...
    [java] Received: Message: 3 sent at: Mon Aug 28 14:29:42 CST 2006  ...
    [java] Received: Message: 4 sent at: Mon Aug 28 14:29:42 CST 2006  ...
    [java] Received: Message: 5 sent at: Mon Aug 28 14:29:43 CST 2006  ...
    [java] Received: Message: 6 sent at: Mon Aug 28 14:29:43 CST 2006  ...
    [java] Received: Message: 7 sent at: Mon Aug 28 14:29:43 CST 2006  ...
    [java] Received: Message: 8 sent at: Mon Aug 28 14:29:43 CST 2006  ...
    [java] Received: Message: 9 sent at: Mon Aug 28 14:29:43 CST 2006  ...
    [java] Closing connection

[编辑] 子项目

  • Apollo 下一代ActiveMQ
  • CMS (stands for C++ Messaging Service)
  • NMS, the .NET Messaging API

[编辑] 图集

[编辑] 相关链接

Comment-32x32.png

<discussion>characters_max=300</discussion>

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱