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

Revision 3537 (checked in by douglm, 1 year ago)

Two intertwined updates here.

Most projects are changed to go some way towards maven. Use maven-ant tasks to deal with build dependencies. Mostly chnages to build.xml and the additon of pom.xml.

Additionally, added a new bedenote project which handles JMS messages. This removes the need for special support from activemq.

Removed the auto-deploy of activemq config and made it a special target - "deployActivemq"

To install this stuff:

1. Check out the bedenote project
2. execute the deployActivemq target
3. Build/deploy bedenote
4. Restart


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