root/trunk/config/bwbuild/jboss/activemq-broker-config.xml

Revision 2760 (checked in by douglm, 3 years ago)

activemq domain now appears in jboss jmx-console

This allows us to see statistics and current state of the activemq system - including the queues

Line 
1 <!--
2     Licensed to the Apache Software Foundation (ASF) under one or more
3     contributor license agreements.  See the NOTICE file distributed with
4     this work for additional information regarding copyright ownership.
5     The ASF licenses this file to You under the Apache License, Version 2.0
6     (the "License"); you may not use this file except in compliance with
7     the License.  You may obtain a copy of the License at
8
9     http://www.apache.org/licenses/LICENSE-2.0
10
11     Unless required by applicable law or agreed to in writing, software
12     distributed under the License is distributed on an "AS IS" BASIS,
13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14     See the License for the specific language governing permissions and
15     limitations under the License.
16 -->
17
18 <!-- Bedework:
19   For the quickstart this file is copied out of the current configuration/build
20   directory into the activemq configuration directory.
21
22   DO NOT edit the copy of this file inside activemq. If you want to change the
23   configuration edit a copy inside your bedework configuration directory.
24  -->
25
26 <!-- START SNIPPET: example -->
27 <beans
28   xmlns="http://www.springframework.org/schema/beans"
29   xmlns:amq="http://activemq.apache.org/schema/core"
30   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
31   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
32   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
33   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
34
35     <!-- Allows us to use system properties as variables in this configuration file
36 -->
37   <bean
38     class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
39   <!--
40     <property name="locations">
41       <value>file:///${activemq.base}/conf/credentials.properties
42       </value>
43     </property>
44   -->
45   </bean>
46
47   <broker xmlns="http://activemq.apache.org/schema/core"
48           brokerName="bedework" useJmx="true" useShutdownHook="false" >
49     <!--
50       MikeD Queues for various bedework services. These are all fed by
51       the virtual queue bedework.sysevents
52     -->
53     <destinations>
54       <!-- The listener just logs the system events -->
55       <queue name="logger"
56              physicalName="bedework.sysevents.logger" />
57
58       <!-- The listener monitors system activity -->
59       <queue name="monitor"
60              physicalName="bedework.sysevents.monitor" />
61
62       <!-- The listener is the crawler which (re)indexes the system -->
63       <queue name="crawler"
64              physicalName="bedework.crawler" />
65
66       <!--
67         The listener is the scheduler which handles events appearing in
68         the in/outbox
69       -->
70       <queue name="schedulerIn"
71              physicalName="bedework.scheduleIn" />
72       <queue name="schedulerOut"
73              physicalName="bedework.scheduleOut" />
74
75       <!-- <topic physicalName="SOME.TOPIC" /> -->
76     </destinations>
77
78     <!-- MikeD -->
79     <destinationInterceptors>
80       <virtualDestinationInterceptor>
81         <virtualDestinations>
82           <compositeQueue name="bedework.sysevents">
83             <forwardTo>
84               <queue physicalName="bedework.sysevents.logger" />
85               <queue physicalName="bedework.sysevents.monitor" />
86               <queue physicalName="bedework.crawler" />
87               <filteredDestination selector="inbox = 'true'"
88                                    queue="bedework.scheduleIn"/>
89               <filteredDestination selector="outbox = 'true'"
90                                    queue="bedework.scheduleOut"/>
91             </forwardTo>
92           </compositeQueue>
93         </virtualDestinations>
94       </virtualDestinationInterceptor>
95     </destinationInterceptors>
96
97     <!--
98       Destination specific policies using destination names or wildcards
99     -->
100     <destinationPolicy>
101       <policyMap>
102         <policyEntries>
103           <policyEntry queue=">" memoryLimit="5mb" />
104           <policyEntry topic=">" memoryLimit="5mb">
105             <!--
106               you can add other policies too such as these
107               <dispatchPolicy> <strictOrderDispatchPolicy/>
108               </dispatchPolicy> <subscriptionRecoveryPolicy>
109               <lastImageSubscriptionRecoveryPolicy/>
110               </subscriptionRecoveryPolicy>
111             -->
112           </policyEntry>
113         </policyEntries>
114       </policyMap>
115     </destinationPolicy>
116
117     <!--
118       MikeD - there are some reports of messages not getting delivered,
119       possibly because consumers aren't going fast enough for activemq and
120       it tries to slow down the producers. The following disables that
121       behavior
122
123       <destinationPolicy>
124         <policyMap>
125           <policyEntries>
126             <policyEntry queue=">" producerFlowControl="false"
127               memoryLimit="64mb" />
128           </policyEntries>
129         </policyMap>
130       </destinationPolicy>
131       -->
132
133     <!-- This allows the activemq domain to appear in the jboss jmx-console -->
134     <managementContext>
135       <managementContext>
136           <MBeanServer>
137               <bean class="org.jboss.mx.util.MBeanServerLocator"
138                     factory-method="locateJBoss" xmlns=""/>
139           </MBeanServer>
140       </managementContext>
141     </managementContext>
142
143     <!-- The store and forward broker networks ActiveMQ will listen to -->
144     <networkConnectors>
145       <!-- by default just auto discover the other brokers
146          Configured out for the time being - causes a lot of error messages
147       <networkConnector name="default-nc" uri="multicast://default" />
148        -->
149       <!--
150         Example of a static configuration: <networkConnector name="host1
151         and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
152       -->
153     </networkConnectors>
154
155     <!-- High throughput but scalability problems - perhaps OK with <=500 connections
156     <persistenceAdapter>
157       <amqPersistenceAdapter syncOnWrite="false"
158         directory="${jboss.server.data.dir}/activemq-data" maxFileLength="20 mb" />
159     </persistenceAdapter> -->
160
161     <!-- Newer adapter - handles 1000s of connections -->
162     <persistenceAdapter>
163       <kahaPersistenceAdapter directory="${jboss.server.data.dir}/activemq" maxDataFileLength="33554432"/>
164     </persistenceAdapter>
165
166     <!-- older and slower is jdbcPersistenceAdapter -->
167
168     <!--
169     <sslContext>
170       <sslContext keyStore="file:${activemq.base}/conf/broker.ks"
171                   keyStorePassword="password"
172                   trustStore="file:${activemq.base}/conf/broker.ts"
173                   trustStorePassword="password" />
174     </sslContext>
175     -->
176
177     <!--
178       The maximum amount of space the broker will use before slowing down
179       producers
180     -->
181     <systemUsage>
182       <systemUsage>
183         <memoryUsage>
184           <memoryUsage limit="20 mb" />
185         </memoryUsage>
186         <storeUsage>
187           <storeUsage limit="1 gb" name="foo" />
188         </storeUsage>
189         <tempUsage>
190           <tempUsage limit="100 mb" />
191         </tempUsage>
192       </systemUsage>
193     </systemUsage>
194
195
196     <!-- The transport connectors ActiveMQ will listen to -->
197     <transportConnectors>
198       <transportConnector name="bedework" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
199       <!--
200       <transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
201       -->
202     </transportConnectors>
203
204   </broker>
205
206   <!--
207   ** Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
208   ** For more details see
209   **
210   ** http://activemq.apache.org/enterprise-integration-patterns.html
211
212   <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
213
214     < ! - - You can use a <package> element for each root package to search for
215          Java routes - - >
216     <package>org.foo.bar</package>
217
218     < ! - - You can use Spring XML syntax to define the routes here using the <route> element - - >
219     <route>
220       <from uri="activemq:example.A"/>
221       <to uri="activemq:example.B"/>
222     </route>
223   </camelContext>
224   -->
225
226   <!--
227   ** Lets configure some Camel endpoints
228   **
229   ** http://activemq.apache.org/camel/components.html
230   -->
231
232   <!-- configure the camel activemq component to use the current broker
233   <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >
234     <property name="connectionFactory">
235       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
236         <property name="brokerURL" value="vm://localhost?create=false&amp;waitForStart=10000" />
237         <property name="userName" value="${activemq.username}"/>
238         <property name="password" value="${activemq.password}"/>
239       </bean>
240     </property>
241   </bean>
242 -->
243
244   <!-- Uncomment to create a command agent to respond to message based admin commands on the ActiveMQ.Agent topic
245 -->
246   <!--
247   <commandAgent xmlns="http://activemq.apache.org/schema/core"
248                 brokerUrl="vm://localhost"
249                 username="${activemq.username}"
250                 password="${activemq.password}"/>
251   -->
252
253   <!-- An embedded servlet engine for serving up the Admin console
254   <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
255     <connectors>
256       <nioConnector port="8161"/>
257     </connectors>
258
259     <handlers>
260       <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
261       <webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
262       <webAppContext contextPath="/fileserver" resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
263     </handlers>
264   </jetty>
265  -->
266   <!--  This xbean configuration file supports all the standard spring xml configuration options
267 -->
268
269
270 </beans>
271
Note: See TracBrowser for help on using the browser.