zoukankan      html  css  js  c++  java
  • Apache ActiveMQの版本更迭和Apache ActiveMQの故障转移

    本文描述apache activemq 版本更迭的原因以及Apache ActiveMQのThe Failover Transport

    new features in 5.2.0 

    1、对信息的传输/消耗,快速产生,缓慢消耗,利用率限制,从变主等有一些建议

    2、通过spring/xbean 加强了ssl安全的配置

    3、消息消耗的新模式

    4、有能力去配置自动丢弃的信息,这些信息是存在已经死去的队列里面

    5、有能力限制最大的连接数量对于代理来讲

    6、有能力配置JDBC锁

    7、activemq-camel 和  activemq-connection-pool  有他们自己的模块,不在是包含在activemq-core中

    8、默认的ActiveMQConnectionFactory代理url是使用了故障转移技术

    9、使用了Apache Camel 1.5

    new features in 5.3.0 

    1、新的KahaDB 持久性存储

    2、Camel 2.0.0 

    3、支持SSL和NIO

    4、提高配置,默认一个产生者和众多消费者

    5、通过non-Java 客户端有能力安排代理服务

    6、更多的代理服务的配置,比如在互联网跟踪信息,完善日志

    new features in 5.4.3

    1、对密码加密

    2、在ajax上增加选择器的支持

    5.4.3版本是5.4.X的改进,支持了全球标准协议LGPL

    在5.4版本中除了以上特点还有:

    1、作业信息的延迟

    2、消息优先处理

    3、webSocket

    4、更好支持OSGI

    5、加强版的shell 脚本

    6、更加容易配置Web console

    7、对Ajax和Rest消费者的选择器

    8、代理服务选择自动更新故障的客户端,代替加入和离开集群的新的代理服务(详细参照Apache ActiveMQのThe Failover Transport)

    new features in 5.5.1

    1、MDC日志

    2、升级到camel 2.7.0

    3、DLQ处理每个持续性的订阅

    4、新的网络链接器MBeans

    5、JDBC存储的IOExceptionHandler

    6、增加对Apache Commons Daemon的支持

    5.5.1版本是5.5.X的改进,支持了全球标准协议LGPL

    new features in 5.6.0

    1、LevelDB 存储

    2、MQTT 传输

    3、 LDAP 安全模块

    4、支持Stomp 1.1

    5、stomp+nio+ssl 传输

    6、KahaDB 持久化

    7、优先故障转移URIs

    8、在代理集群自动平衡客户端

    new features in 5.7.0

    1、Java 7的支持

    2、安全WEBSocket

    3、代理基于再装载

    4、加锁

    5、设置RedeliveryPolicy 

    6、包括Apache Camel 2.10

    new features in 5.8.0

    1、AMQP

    2、新功能模块和允许更小脚本的模块

    3、在http 上通过REST和jolokia管理

    4、包括 Camel 2.10.3

    5、支持Java7

    6、不支持纯粹的主从

    这个版本需要特别注意的是:

    1、新的模型影响maven的pom文件依赖,activemq-core已经被activemq-broker/client替代,各式各样的信息存储在不同的模块中,超级模型现已变成activemq-all

    2、改变的objectname命名将会影响脚本或者工具,现在所有的mbeans使用的是type=broker的形式

    3、OSGI一体化

    4、启动的文件不在bin/run.jar现已经保存在了activemq.jar

    new features in  5.9.0

    1、仿制LevelDB存储,

    2、运行时间的配置

    3、在activemq-jms-pool的JMS XA连接池配置

    4、MQTT

    5、基于Camel的代理服务

    6、在丢失了主服务的状态的时候代理自动重启

    7、加强版的AMQP和LevelDB

    这个版本需要特别注意的是:改变了JDBC持久化适配

    new features in   5.10.0

    1、支持java8

    2、Shiro安全配置

    3、加强MQTT,AMQP,LevelDB

    4、提高 RAR/JCA,运行时间配置

    new features in   5.11.0

    1、目的信息导入导出

    2、动态的Camel

    3、MQTT

    4、启动脚本简单化

    5、覆盖作业数据库问题

    6、Jetty8

    7、Karaf2.4.1

    new features in  5.12.0

    这个版本提供了AMQP和MQTT的支持,以及修复了AMQP和MQTT的bug。

    new features in  5.13.0

    这个版本提供了自动传输协议,多通道的动态网关支持。

    --------------------------------------------------------------华丽分割线------------------------------------------------------------

    下面介绍Apache ActiveMQのThe Failover Transport

    配置语法:

    failover:(uri1,...,uriN)?transportOptions&nestedURIOptions

    or

    failover:uri1,...,uriN

    transportOptions列表

    Option Name

    Default Value

    Description

    initialReconnectDelay

    10

    The delay (in ms) before the first reconnect attempt.

    maxReconnectDelay

    30000

    The maximum delay (in ms) between the second and subsequent reconnect attempts.

    useExponentialBackOff

    true

    If true an exponential back-off is used between reconnect attempts.

    reconnectDelayExponent

    2.0

    The exponent used during exponential back-off attempts.

    maxReconnectAttempts

    -1 | 0

    From ActiveMQ 5.6: default is -1, retry forever. 0 means disables re-connection, e.g: just try to connect once.
    Before ActiveMQ 5.6: default is 0, retry forever. 
    All versions: a value >0 denotes the maximum number of reconnect attempts before an error is sent back to the client.

    startupMaxReconnectAttempts

    -1

    A value of -1 denotes that the number of connection attempts at startup should be unlimited.

    A value of  >=0 denotes the number of reconnect attempts at startup that will be made after which an error is sent back to the client when the client makes a subsequent reconnect attempt.

    Note: once successfully connected the maxReconnectAttempts option prevails.

    randomize

    true

    If true, choose a URI at random from the list to use for reconnect.

    backup

    false

    Initialize and hold a second transport connection - to enable fast failover.

    timeout

    -1

    Set the timeout on send operations (in ms) without interruption of re-connection process. Since ActiveMQ 5.3.

    trackMessages

    false

    Keep a cache of in-flight messages that will flushed to a broker on reconnect.

    maxCacheSize

    131072

    Size in bytes for the cache of tracked messages. Applicable only if trackMessages is true.

    updateURIsSupported

    true

    Determines whether the client should accept updates from the broker to its list of known URIs. Since ActiveMQ 5.4.

    updateURIsURL

    null

    A URL (or path to a local file) to a text file containing a comma separated list of URIs to use for reconnect in the case of failure. Since ActiveMQ 5.4.

    nested.*

    null

    Common URI options that will be applied to each URI in the list. Since ActiveMQ 5.9.

    warnAfterReconnectAttempts

    10

    A value >0 specifies the number of reconnect attempts before a warning is logged. A logged warning indicates that there is no current connection but re-connection is being attempted.

    A value of <=0 disables the logging of warnings about reconnect attempts. Since ActiveMQ 5.10.

    reconnectSupported

    true

    Determines whether the client should respond to broker ConnectionControl events with a reconnect (see:rebalanceClusterClients).

    这是一个典型的分层URI,它的含义是“在本地61616端口创建一个TCP连接。”

        这类使用简单分层URI模式的连接器被叫做low-level连接器,它们被用来实现基础的网络交流协议。连接器URIs使用schema来表示当前的网络协议,path元素用来标识网络资源(通常是地址和端口),query用来指定特殊的配置参数。

    图4.1显示了URI的结构。这个URI扩展了前面的例子,它还告诉所有的代理器记录所有的命令(trace=true部分)。这是TCP端口可选的一个参数。



     ActiveMQ的故障转移传输机制支持自动重连。也即是说,如果一个代理器不在线,客户端可以连到另一个代理器上。ActiveMQ通过使用复合URIs满足这种需求。在图4.2,你可以看到一个这种URI。

    文章参考:http://windows9834.blog.163.com/blog/static/27345004201322552419947/  重连的一些代码建议

    http://manzhizhen.iteye.com/blog/2105572  介绍消费者集群和配置参数

    http://m.oschina.net/blog/286454    单个URI重连

  • 相关阅读:
    【剑指offer】面试题40:数组中只出现一次的数字
    【剑指offer】面试题39扩展:平衡二叉树
    【剑指offer】面试题39:二叉树的深度
    【剑指offer】面试题38:数字在排序数组中出现的次数
    【剑指offer】面试题37:两个链表的第一个公共结点
    【剑指offer】面试题36:数组中的逆序对
    剑指Offer
    设计模式
    ACM
    算法设计与分析
  • 原文地址:https://www.cnblogs.com/wanghongye/p/5064280.html
Copyright © 2011-2022 走看看