1616-->
1717<!-- START SNIPPET: example -->
1818<beans
19- xmlns=" http://www.springframework.org/schema/beans"
20- xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
21- xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
19+ xmlns =" http://www.springframework.org/schema/beans"
20+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
21+ xsi : schemaLocation =" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
2222 http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd" >
23- <!-- Allows us to use system properties as variables in this configuration file -->
24- <bean class =" org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >
25- <property name =" locations" >
26- <value >file:${activemq.conf}/credentials.properties</value >
27- </property >
28- </bean >
29-
30- <!-- Allows accessing the server log -->
31- <bean id =" logQuery" class =" io.fabric8.insight.log.log4j.Log4jLogQuery"
32- lazy-init =" false" scope =" singleton"
33- init-method =" start" destroy-method =" stop" >
34- </bean >
35-
36- <!--
37- The <broker> element is used to configure the ActiveMQ broker.
38- -->
39- <broker xmlns =" http://activemq.apache.org/schema/core" brokerName =" localhost" dataDirectory =" ${activemq.data}"
40- schedulerSupport=" true" >
41-
42- <destinationPolicy >
43- <policyMap >
44- <policyEntries >
45- <policyEntry topic =" >" >
46- <!-- The constantPendingMessageLimitStrategy is used to prevent
47- slow topic consumers to block producers and affect other consumers
48- by limiting the number of messages that are retained
49- For more information, see:
50-
51- http://activemq.apache.org/slow-consumer-handling.html
52-
53- -->
54- <pendingMessageLimitStrategy >
55- <constantPendingMessageLimitStrategy limit =" 1000" />
56- </pendingMessageLimitStrategy >
57- </policyEntry >
58- <policyEntry queue =" >" >
59- <deadLetterStrategy >
60- <!--
61- Use the prefix 'DLQ.' for the destination name, and make
62- the DLQ a queue rather than a topic
63- -->
64- <individualDeadLetterStrategy queuePrefix =" DLQ." useQueueForQueueMessages =" true" processNonPersistent =" true" />
65- </deadLetterStrategy >
66- </policyEntry >
67- </policyEntries >
68- </policyMap >
69- </destinationPolicy >
70-
71-
72- <!--
73- The managementContext is used to configure how ActiveMQ is exposed in
74- JMX. By default, ActiveMQ uses the MBean server that is started by
75- the JVM. For more information, see:
76-
77- http://activemq.apache.org/jmx.html
78- -->
79- <managementContext >
80- <managementContext createConnector =" false" />
81- </managementContext >
82-
83- <!--
84- Configure message persistence for the broker. The default persistence
85- mechanism is the KahaDB store (identified by the kahaDB tag).
86- For more information, see:
87-
88- http://activemq.apache.org/persistence.html
89- -->
90- <persistenceAdapter >
91- <kahaDB directory =" ${activemq.data}/kahadb" />
92- </persistenceAdapter >
93-
94-
95- <!--
96- The systemUsage controls the maximum amount of space the broker will
97- use before disabling caching and/or slowing down producers. For more information, see:
98- http://activemq.apache.org/producer-flow-control.html
99- -->
100- <systemUsage >
101- <systemUsage >
102- <memoryUsage >
103- <memoryUsage percentOfJvmHeap =" 70" />
104- </memoryUsage >
105- <storeUsage >
106- <storeUsage limit =" 100 gb" />
107- </storeUsage >
108- <tempUsage >
109- <tempUsage limit =" 50 gb" />
110- </tempUsage >
111- </systemUsage >
112- </systemUsage >
113-
114- <!--
115- The transport connectors expose ActiveMQ over a given protocol to
116- clients and other brokers. For more information, see:
117-
118- http://activemq.apache.org/configuring-transports.html
119- -->
120- <transportConnectors >
121- <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
122- <transportConnector name =" openwire"
123- uri=" tcp://0.0.0.0:61616?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
124- <transportConnector name =" amqp"
125- uri=" amqp://0.0.0.0:5672?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
126- <transportConnector name =" stomp"
127- uri=" stomp://0.0.0.0:61613?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
128- <transportConnector name =" mqtt"
129- uri=" mqtt://0.0.0.0:1883?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
130- <transportConnector name =" ws"
131- uri=" ws://0.0.0.0:61614?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
132- </transportConnectors >
133-
134- <!-- destroy the spring context on shutdown to stop jetty -->
135- <shutdownHooks >
136- <bean xmlns =" http://www.springframework.org/schema/beans"
137- class =" org.apache.activemq.hooks.SpringContextHook" />
138- </shutdownHooks >
139-
140- </broker >
141-
142- <!--
143- Enable web consoles, REST and Ajax APIs and demos
144- The web consoles requires by default login, you can disable this in the jetty.xml file
145-
146- Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
147- -->
148- <import resource =" jetty.xml" />
23+ <!-- Allows us to use system properties as variables in this configuration file -->
24+ <bean class =" org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >
25+ <property name =" locations" >
26+ <value >file:${activemq.conf}/credentials.properties</value >
27+ </property >
28+ </bean >
29+
30+
31+ <!--
32+ The <broker> element is used to configure the ActiveMQ broker.
33+ -->
34+ <broker xmlns =" http://activemq.apache.org/schema/core" brokerName =" localhost" dataDirectory =" ${activemq.data}"
35+ schedulerSupport =" true" >
36+
37+ <destinationPolicy >
38+ <policyMap >
39+ <policyEntries >
40+ <policyEntry topic =" >" >
41+ <!-- The constantPendingMessageLimitStrategy is used to prevent
42+ slow topic consumers to block producers and affect other consumers
43+ by limiting the number of messages that are retained
44+ For more information, see:
45+
46+ http://activemq.apache.org/slow-consumer-handling.html
47+
48+ -->
49+ <pendingMessageLimitStrategy >
50+ <constantPendingMessageLimitStrategy limit =" 1000" />
51+ </pendingMessageLimitStrategy >
52+ </policyEntry >
53+ <policyEntry queue =" >" >
54+ <deadLetterStrategy >
55+ <!--
56+ Use the prefix 'DLQ.' for the destination name, and make
57+ the DLQ a queue rather than a topic
58+ -->
59+ <individualDeadLetterStrategy queuePrefix =" DLQ." useQueueForQueueMessages =" true" processNonPersistent =" true" />
60+ </deadLetterStrategy >
61+ </policyEntry >
62+ </policyEntries >
63+ </policyMap >
64+ </destinationPolicy >
65+
66+
67+ <!--
68+ The managementContext is used to configure how ActiveMQ is exposed in
69+ JMX. By default, ActiveMQ uses the MBean server that is started by
70+ the JVM. For more information, see:
71+
72+ http://activemq.apache.org/jmx.html
73+ -->
74+ <managementContext >
75+ <managementContext createConnector =" false" />
76+ </managementContext >
77+
78+ <!--
79+ Configure message persistence for the broker. The default persistence
80+ mechanism is the KahaDB store (identified by the kahaDB tag).
81+ For more information, see:
82+
83+ http://activemq.apache.org/persistence.html
84+ -->
85+ <persistenceAdapter >
86+ <kahaDB directory =" ${activemq.data}/kahadb" />
87+ </persistenceAdapter >
88+
89+
90+ <!--
91+ The systemUsage controls the maximum amount of space the broker will
92+ use before disabling caching and/or slowing down producers. For more information, see:
93+ http://activemq.apache.org/producer-flow-control.html
94+ -->
95+ <systemUsage >
96+ <systemUsage >
97+ <memoryUsage >
98+ <memoryUsage percentOfJvmHeap =" 70" />
99+ </memoryUsage >
100+ <storeUsage >
101+ <storeUsage limit =" 100 gb" />
102+ </storeUsage >
103+ <tempUsage >
104+ <tempUsage limit =" 50 gb" />
105+ </tempUsage >
106+ </systemUsage >
107+ </systemUsage >
108+
109+ <!--
110+ The transport connectors expose ActiveMQ over a given protocol to
111+ clients and other brokers. For more information, see:
112+
113+ http://activemq.apache.org/configuring-transports.html
114+ -->
115+ <transportConnectors >
116+ <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
117+ <transportConnector name =" openwire"
118+ uri =" tcp://0.0.0.0:61616?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
119+ <transportConnector name =" amqp"
120+ uri =" amqp://0.0.0.0:5672?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
121+ <transportConnector name =" stomp"
122+ uri =" stomp://0.0.0.0:61613?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
123+ <transportConnector name =" mqtt"
124+ uri =" mqtt://0.0.0.0:1883?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
125+ <transportConnector name =" ws"
126+ uri =" ws://0.0.0.0:61614?maximumConnections=1000& wireFormat.maxFrameSize=104857600" />
127+ </transportConnectors >
128+
129+ <!-- destroy the spring context on shutdown to stop jetty -->
130+ <shutdownHooks >
131+ <bean xmlns =" http://www.springframework.org/schema/beans"
132+ class =" org.apache.activemq.hooks.SpringContextHook" />
133+ </shutdownHooks >
134+
135+ </broker >
136+
137+ <!--
138+ Enable web consoles, REST and Ajax APIs and demos
139+ The web consoles requires by default login, you can disable this in the jetty.xml file
140+
141+ Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
142+ -->
143+ <import resource =" jetty.xml" />
149144
150145</beans >
151- <!-- END SNIPPET: example -->
146+ <!-- END SNIPPET: example -->
0 commit comments