ActiveMq的配置文件详细说明[转]

来源:互联网 发布:全景云平台源码 编辑:程序博客网 时间:2024/04/29 18:25

 

 

 

注释

关于XML配置中元素的具体信息可以参考http://activemq.apache.org/xbean-xml-reference-50.html 下面介绍本篇配置使用的一些重要元素。

DispathPolicy

ActiveMQ支持3中不同的分发策略(避免翻译了以后误解,这里用原文):

  1. <roundRobinDispatchPolicy>:Simple dispatch policy that sends a message to every subscription that matches the message.
  2. <simpleDispatchPolicy>:Simple dispatch policy that sends a message to every subscription that matches the message.
  3. <strictOrderDispatchPolicy>:Dispatch policy that causes every subscription to see messages in the same order.

SubscriptionRecoveryPolicy

ActiveMQ支持6种恢复策略,可以自行选择使用不同的策略

  1. <fixedCountSubscriptionRecoveryPolicy>: keep a fixed count of last messages.
  2. <fixedSizedSubscriptionRecoveryPolicy>: keep a fixed amount of memory available in RAM for message history which is evicted in time order.
  3. <lastImageSubscriptionRecoveryPolicy>:only keep the last message.
  4. <noSubscriptionRecoveryPolicy>:disable recovery of messages.
  5. <queryBasedSubscriptionRecoveryPolicy>:perform a user specific query mechanism to load any messages they may have missed.
  6. <timedSubscriptionRecoveryPolicy>:keep a timed buffer of messages around in memory and use that to recover new subscriptions.