Apache ActiveMQ

来自开放百科 - 灰狐
2006年10月12日 (四) 10:09WikiSysop (讨论 | 贡献)的版本

跳转到: 导航, 搜索

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

目前ActiveMQ转入Apache基金会, 成为正在孵化的一个项目。

ActiveMQ-BrokerDiagram-1.png

功能

  • fully supports JMS 1.1 and J2EE 1.4
  • supports a variety of Cross Language Clients from Java, C, C++, C#, Ruby, Perl, Python, PHP

--OpenWire for high performance clients in Java, C, C++, C#

--Stomp support so that clients can be written easily in C, Ruby, Perl, Python, PHP to talk to ActiveMQ

  • includes JCA 1.5 resource adaptors for inbound & outbound messaging so that ActiveMQ should auto-deploy in any J2EE 1.4 compliant server
  • tested inside Geronimo, Spring and JBoss 4
  • support for transient, persistent, transactional and XA messaging
  • supports pluggable transport protocols such as in-VM, TCP, SSL, NIO, UDP, multicast, JGroups and JXTA transports
  • supports very fast persistence using JDBC along with a high performance journal
  • designed for high performance clustering, client-server, peer based communication
  • REST API to provide technology agnostic and language neutral web based API to messaging
  • Ajax to support web streaming support to web browsers using pure DHTML, allowing web browsers to be part of the messaging fabric
  • Axis Support so that ActiveMQ can be easily dropped into Apache Axis runtimes to provide reliable messaging
  • Spring Support so that ActiveMQ can be easily embedded into Spring applications and configured using Spring's XML configuration mechanism
  • can be used as an in memory JMS provider, ideal for unit testing
  • Wildcards support to subscribe to powerful destination hierarchies.
  • Composite Destinations support to allow many destinations to be used in one simple atomic JMS operation
  • JSR 77 / 88 support for easy deployment & management & hot deployment
  • provides an implementation of ActiveCluster

测试

运行服务

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

相关链接

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

变换
操作
导航
工具箱