那是一段如此自以为是,又如此狼狈不堪的青春岁月。
有欢笑,也有泪水;有朝气,也有颓废;
有甜蜜,也有荒唐;有自信,也有迷茫。



显示标签为“ActiveMQ”的博文。显示所有博文
显示标签为“ActiveMQ”的博文。显示所有博文

About ActiveMQ's version

What's new version on ActiveMQ?

There are so many new versions,and the ActiveMQ's website has a facelift. I have introduced the new features about version 4.0,now I will continue on the remaining...
New Features in Apache ActiveMQ 4.1
New Features in Apache ActiveMQ 4.2
The new features caused some changes in AvticeMQ's Xml Configuration file,so you must be careful if you want to upgrade from 4.0 to 4.1.

Initial Configuration

Required JARs

To make ActiveMQ easy to use, the default activemq.jar comes complete with all the libraries required. If you prefer to have explicit control over all the jars used by ActiveMQ here is the full list of individual jars required

  • activemq-core.jar
  • activeio.jar
  • commons-logging.jar
  • backport-util-concurrent.jar
  • mx4j (if running on Java 1.4)
  • J2EE APIs which could be the j2ee.jar from Sun or your J2EE container or you could use Geronimo's freely distributable geronimo-spec-j2ee.jar. If you are inside a servlet container and being dependent on the j2ee.jar causes you troubles, the parts of the J2EE jar we are dependent on are as follows...
    • geronimo-spec-jms.jar
    • geronimo-spec-jta.jar
    • geronimo-spec-j2ee-management.jar

If you want to grab a J2EE specification jar we recommend the Apache repository

需要的JAR包:
为了使用方便,默认的activemq.jar包含了全部需要的类包。如果你更喜欢明确的操作所有的jars,下面列出了ActiveMQ所用到每个单独的jar包:

  • activemq-core.jar
  • activeio.jar
  • commons-logging.jar
  • backport-util-concurrent.jar
  • mx4j (if running on Java 1.4)
  • j2ee.jar

Optional JARS

  • spring.jar - if you wish to use the XML configuration file for configuring the Message Broker
  • if you wish to use message persistence then you need to add a persistent jar to your classpath (see below). If you just want a lightweight message bus with no durability you can leave this step out but we highly recommend persistence for production deployments.
  • if you want to use Zeroconf based discovery then you need the jmdns.jar
    Note:
    The zeroconf protol is no longer supported in AMQ 4.x.
  • spring.jar -如果你想要通过XML配置文件来配置消息Broker
  • 如果你想要使用消息持久化,你必须在你的类路径下添加一个持久化相关的jar包(看下面)。如果你仅仅是想要进行轻量级的消息传输,不需要耐久性,你可以跳过这一步骤,不过我们强烈推荐你在产品开发的时候使用持久化。
  • Zeroconf 协议在AMQ4.x中已经不再支持,这里相关的就不介绍了。

Persistence Support

We support persistence via JDBC and a high performance journal. For full explict control over configuration check out the Xml Configuration.

我们通过JDBC和高性能的日志来支持持久化。详细的配置信息请看XML Configuration。
如何通过XML文件来配置管理AMQ,会单独介绍。

Next steps

One of the first things you might want to do is start a broker. Once you have a broker running you could try using the JNDI Support which shows how to run an example JMS program. Or there are some other example programs

If you don't want to use JNDI you can just instantiate an ActiveMQConnectionFactory, configure its properties directly and then you're ready to use the standard JMS API to create Connections, Sessions, MessageProducer and MessageConsumer instances.

你想做的第一件事情也许就是启动一个broker。如果你已经有了一个启动的broker,你可以试着使用一下JNDI Support 来运行一个JMS例子项目。当来,如果你不想使用JNDI,也可以运行别的例子程序,这些是通过 ActiveMQConnectionFactory直接配置属性,然后你可以使用标准的JMS API来创建连接,Sessions,消息创造者和消息消费者等实例。


ActiveMQ性能测试报告

Logicblaze 对ActiveMQ4.0.1做了全面的测试,它将ActiveMQ和其他的消息服务器(SonicMQ、SwiftMQ、JBoss Messaging 1.0.1.CR3)做了比较。这样,再加上前面的两篇文章(ActiveMQ介绍和ActiveMQ特性)相信可以帮助还处于服务器选型的朋友做出选择。

性能测试报告:AMQ4_performance_report.pdf
如果有需要老版本ActiveMQ_3.1测试报告的朋友也可以留言。

ActiveMQ特性

  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,当然消息越大,对服务器和带宽的要求就越高。

ActiveMQ介绍

出于学习英语的目的,以后会有一系列的英文翻译文章出现,呵呵。首先就是Apache ActiveMQ系列,选择这个主要是项目中正在使用,也算是有点心得~~

Apache ActiveMQ is a fast open source JMS 1.1 Message Fabric which supports clustering, peer networks, discovery, TCP, SSL, multicast, persistence, XA and integrates seamlessly into J2EE 1.4 containers, light weight containers and any Java Virtual Machine together with having a host of Cross Language Clients. ActiveMQ is released under the Apache 2.0 License

Apache ActiveMQ是一个快速的开源消息组件(框架?),支持集群,同等网络,自动检测,TCP,SSL,广播,持久化,XA,和J2EE1.4容器无缝结合,并且支持轻量级容器和大多数跨语言客户端上的Java虚拟机(?)。ActiveMQ的发布得到了Apache2.0的许可。