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

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

In <conf>/activemq-broker-conf.xml change

<transportConnector name="bedework" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
to
<transportConnector name="bedework" uri="tcp://localhost:61616" />

That is - drop the discoveryUri.

According to the activemq book this allows activemq brokers to discover each other and possibly consume their messages. At the very least it appears to be the source of some exceptions I get when I suspend my laptop.

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" />
199       <!--
200         According to the book we shouldn't specify a discoveryUri - can lead to
201         multiple activemq brokers eating each others messages, At the very least
202         it leads to exceptions when I close the lid of my laptop.
203       <transportConnector name="bedework" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
204       <transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
205       -->
206     </transportConnectors>
207
208   </broker>
209
210   <!--
211   ** Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
212   ** For more details see
213   **
214   ** http://activemq.apache.org/enterprise-integration-patterns.html
215
216   <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
217
218     < ! - - You can use a <package> element for each root package to search for
219          Java routes - - >
220     <package>org.foo.bar</package>
221
222     < ! - - You can use Spring XML syntax to define the routes here using the <route> element - - >
223     <route>
224       <from uri="activemq:example.A"/>
225       <to uri="activemq:example.B"/>
226     </route>
227   </camelContext>
228   -->
229
230   <!--
231   ** Lets configure some Camel endpoints
232   **
233   ** http://activemq.apache.org/camel/components.html
234   -->
235
236   <!-- configure the camel activemq component to use the current broker
237   <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >
238     <property name="connectionFactory">
239       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
240         <property name="brokerURL" value="vm://localhost?create=false&amp;waitForStart=10000" />
241         <property name="userName" value="${activemq.username}"/>
242         <property name="password" value="${activemq.password}"/>
243       </bean>
244     </property>
245   </bean>
246 -->
247
248   <!-- Uncomment to create a command agent to respond to message based admin commands on the ActiveMQ.Agent topic
249 -->
250   <!--
251   <commandAgent xmlns="http://activemq.apache.org/schema/core"
252                 brokerUrl="vm://localhost"
253                 username="${activemq.username}"
254                 password="${activemq.password}"/>
255   -->
256
257   <!-- An embedded servlet engine for serving up the Admin console
258   <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
259     <connectors>
260       <nioConnector port="8161"/>
261     </connectors>
262
263     <handlers>
264       <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
265       <webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
266       <webAppContext contextPath="/fileserver" resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
267     </handlers>
268   </jetty>
269  -->
270   <!--  This xbean configuration file supports all the standard spring xml configuration options
271 -->
272
273
274 </beans>
275
Note: See TracBrowser for help on using the browser.