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

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

Rearrange source and build so that the monitor module is built and deployed along with the rest.

Filter the crawler queue or a rebuild will fail due to self generated messages

Add a read-only message count property to the indexer

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               <filteredDestination selector="indexable = 'true'"
87                                    queue="bedework.crawler"/>
88               <filteredDestination selector="inbox = 'true'"
89                                    queue="bedework.scheduleIn"/>
90               <filteredDestination selector="outbox = 'true'"
91                                    queue="bedework.scheduleOut"/>
92             </forwardTo>
93           </compositeQueue>
94         </virtualDestinations>
95       </virtualDestinationInterceptor>
96     </destinationInterceptors>
97
98     <!--
99       Destination specific policies using destination names or wildcards
100     -->
101     <destinationPolicy>
102       <policyMap>
103         <policyEntries>
104           <policyEntry queue=">" memoryLimit="5mb" />
105           <policyEntry topic=">" memoryLimit="5mb">
106             <!--
107               you can add other policies too such as these
108               <dispatchPolicy> <strictOrderDispatchPolicy/>
109               </dispatchPolicy> <subscriptionRecoveryPolicy>
110               <lastImageSubscriptionRecoveryPolicy/>
111               </subscriptionRecoveryPolicy>
112             -->
113           </policyEntry>
114         </policyEntries>
115       </policyMap>
116     </destinationPolicy>
117
118     <!--
119       MikeD - there are some reports of messages not getting delivered,
120       possibly because consumers aren't going fast enough for activemq and
121       it tries to slow down the producers. The following disables that
122       behavior
123
124       <destinationPolicy>
125         <policyMap>
126           <policyEntries>
127             <policyEntry queue=">" producerFlowControl="false"
128               memoryLimit="64mb" />
129           </policyEntries>
130         </policyMap>
131       </destinationPolicy>
132       -->
133
134     <!-- This allows the activemq domain to appear in the jboss jmx-console -->
135     <managementContext>
136       <managementContext>
137           <MBeanServer>
138               <bean class="org.jboss.mx.util.MBeanServerLocator"
139                     factory-method="locateJBoss" xmlns=""/>
140           </MBeanServer>
141       </managementContext>
142     </managementContext>
143
144     <!-- The store and forward broker networks ActiveMQ will listen to -->
145     <networkConnectors>
146       <!-- by default just auto discover the other brokers
147          Configured out for the time being - causes a lot of error messages
148       <networkConnector name="default-nc" uri="multicast://default" />
149        -->
150       <!--
151         Example of a static configuration: <networkConnector name="host1
152         and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
153       -->
154     </networkConnectors>
155
156     <!-- High throughput but scalability problems - perhaps OK with <=500 connections
157     <persistenceAdapter>
158       <amqPersistenceAdapter syncOnWrite="false"
159         directory="${jboss.server.data.dir}/activemq-data" maxFileLength="20 mb" />
160     </persistenceAdapter> -->
161
162     <!-- Newer adapter - handles 1000s of connections -->
163     <persistenceAdapter>
164       <kahaPersistenceAdapter directory="${jboss.server.data.dir}/activemq" maxDataFileLength="33554432"/>
165     </persistenceAdapter>
166
167     <!-- older and slower is jdbcPersistenceAdapter -->
168
169     <!--
170     <sslContext>
171       <sslContext keyStore="file:${activemq.base}/conf/broker.ks"
172                   keyStorePassword="password"
173                   trustStore="file:${activemq.base}/conf/broker.ts"
174                   trustStorePassword="password" />
175     </sslContext>
176     -->
177
178     <!--
179       The maximum amount of space the broker will use before slowing down
180       producers
181     -->
182     <systemUsage>
183       <systemUsage>
184         <memoryUsage>
185           <memoryUsage limit="20 mb" />
186         </memoryUsage>
187         <storeUsage>
188           <storeUsage limit="1 gb" name="foo" />
189         </storeUsage>
190         <tempUsage>
191           <tempUsage limit="100 mb" />
192         </tempUsage>
193       </systemUsage>
194     </systemUsage>
195
196
197     <!-- The transport connectors ActiveMQ will listen to -->
198     <transportConnectors>
199       <transportConnector name="bedework" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
200       <!--
201       <transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
202       -->
203     </transportConnectors>
204
205   </broker>
206
207   <!--
208   ** Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
209   ** For more details see
210   **
211   ** http://activemq.apache.org/enterprise-integration-patterns.html
212
213   <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
214
215     < ! - - You can use a <package> element for each root package to search for
216          Java routes - - >
217     <package>org.foo.bar</package>
218
219     < ! - - You can use Spring XML syntax to define the routes here using the <route> element - - >
220     <route>
221       <from uri="activemq:example.A"/>
222       <to uri="activemq:example.B"/>
223     </route>
224   </camelContext>
225   -->
226
227   <!--
228   ** Lets configure some Camel endpoints
229   **
230   ** http://activemq.apache.org/camel/components.html
231   -->
232
233   <!-- configure the camel activemq component to use the current broker
234   <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >
235     <property name="connectionFactory">
236       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
237         <property name="brokerURL" value="vm://localhost?create=false&amp;waitForStart=10000" />
238         <property name="userName" value="${activemq.username}"/>
239         <property name="password" value="${activemq.password}"/>
240       </bean>
241     </property>
242   </bean>
243 -->
244
245   <!-- Uncomment to create a command agent to respond to message based admin commands on the ActiveMQ.Agent topic
246 -->
247   <!--
248   <commandAgent xmlns="http://activemq.apache.org/schema/core"
249                 brokerUrl="vm://localhost"
250                 username="${activemq.username}"
251                 password="${activemq.password}"/>
252   -->
253
254   <!-- An embedded servlet engine for serving up the Admin console
255   <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
256     <connectors>
257       <nioConnector port="8161"/>
258     </connectors>
259
260     <handlers>
261       <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
262       <webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
263       <webAppContext contextPath="/fileserver" resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
264     </handlers>
265   </jetty>
266  -->
267   <!--  This xbean configuration file supports all the standard spring xml configuration options
268 -->
269
270
271 </beans>
272
Note: See TracBrowser for help on using the browser.