2024年4月28日发(作者:)

1.

2. xmlns="/schema/beans"

3. xmlns:amq="/config/1.0"

4. xmlns:xsi="/2001/XMLSchema-instance" xsi:sc

hemaLocation="/schema/beans http:

///schema/beans/

5. /config/1.0 /sch

ema/

6. /camel/schema/spring>

7.

8.

9.

10.

11.

12. 2.168.1.148" persistent ="true" dataDirectory="${}

/data" useShutdownHook="false">

13.

14.

15.

16.

17.

18.

19.

20. lse" memoryLimit="10mb">

21.

22.

23.

24.

25.

26.

27.

28.

29.

30.

31.

32.

33.

34.

35.

36.

37.

38. .148:61616" discoveryUri="multicast://default"/>

39. 148:61617"/>

40. 1.148:61613"/>

41. .148:61222"/>

42.

43.

44.

45.

46.

>

47.

48.

49.

50.

51.

52.

53.

54.

55.

56.

57.

58.

59.

60. }/webapps/admin" logUrlOnStart="true" />

61. }/webapps/demo" logUrlOnStart="true" />

62.

63.

64.

Xml代码

1.

2. xmlns="/schema/beans"

3. xmlns:amq="/config/1.0"

4. xmlns:xsi="/2001/XMLSchema-instance" xsi:sche

maLocation="/schema/beans

/schema/beans/

5. /config/1.0 /schem

a/

6. /camel/schema/spring>

7.

8.

9.

10.

11.168.1.148" persistent ="true" dataDirectory="${}/d

ata" useShutdownHook="false">

12.

13.

14.

15.

16.

17.

18.

yLimit="10mb">

19.

20.

21.

22.

23.

24.

25.

26.

27.

28.

29.

30.

31.

32.

33.

34.

35.616" discoveryUri="multicast://default"/>

36.17"/>

37.1613"/>

38.222"/>

39.

40.

41.

42.

43.

44.

45.

46.

47.

48.

49.

50.

51.

52.

53.se}/webapps/admin" logUrlOnStart="true" />

54.e}/webapps/demo" logUrlOnStart="true" />

55.

56.

57.

注释

关于XML配置中元素的具体信息可以参考

/ 下面介绍本篇配

置使用的一些重要元素。

DispathPolicy

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

1. :Simple dispatch policy that sends a

message to every subscription that matches the message.

2. :Simple dispatch policy that sends a message

to every subscription that matches the message.

3. :Dispatch policy that causes every

subscription to see messages in the same order.

SubscriptionRecoveryPolicy

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

1. : keep a fixed count of

last messages.

2. : keep a fixed amount of

memory available in RAM for message history which is evicted in time

order.

3. :only keep the last message.

4. :disable recovery of messages.

5. :perform a user specific

query mechanism to load any messages they may have missed.

6. :keep a timed buffer of messages

around in memory and use that to recover new subscriptions.