注释
关于XML配置中元素的具体信息可以参考http://activemq.apache.org/xbean-xml-reference-50.html 下面介绍本篇配置使用的一些重要元素。
DispathPolicy
ActiveMQ支持3中不同的分发策略(避免翻译了以后误解,这里用原文):
- <roundRobinDispatchPolicy>:Simple dispatch policy that sends a message to every subscription that matches the message.
- <simpleDispatchPolicy>:Simple dispatch policy that sends a message to every subscription that matches the message.
- <strictOrderDispatchPolicy>:Dispatch policy that causes every subscription to see messages in the same order.
SubscriptionRecoveryPolicy
ActiveMQ支持6种恢复策略,可以自行选择使用不同的策略
- <fixedCountSubscriptionRecoveryPolicy>: keep a fixed count of last messages.
- <fixedSizedSubscriptionRecoveryPolicy>: keep a fixed amount of memory available in RAM for message history which is evicted in time order.
- <lastImageSubscriptionRecoveryPolicy>:only keep the last message.
- <noSubscriptionRecoveryPolicy>:disable recovery of messages.
- <queryBasedSubscriptionRecoveryPolicy>:perform a user specific query mechanism to load any messages they may have missed.
- <timedSubscriptionRecoveryPolicy>:keep a timed buffer of messages around in memory and use that to recover new subscriptions.