Apache ActiveMQ

来自开放百科 - 灰狐
跳转到: 导航, 搜索
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>

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

变换
操作
导航
工具箱