/
broker.xml
125 lines (106 loc) · 5.77 KB
/
broker.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="UTF-8"?>
<!--DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd" -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jms="http://www.springframework.org/schema/jms" xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/jms
http://www.springframework.org/schema/jms/spring-jms.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this configuration
file -->
<bean id="activemq.propertyPlaceholderConfigurer"
class="org.geoserver.cluster.impl.utils.JMSPropertyPlaceholderConfigurer">
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
<property name="searchSystemEnvironment" value="true" />
<property name="ignoreUnresolvablePlaceholders" value="false" />
<property name="ignoreResourceNotFound" value="true" />
<constructor-arg index="0" type="Resource">
<value>embedded-broker.properties</value>
</constructor-arg>
<constructor-arg index="1" type="JMSConfiguration"
ref="JMSConfiguration" />
</bean>
<broker id="broker" persistent="${activemq.broker.persistent}"
useJmx="${activemq.jmx.useJmx}" xmlns="http://activemq.apache.org/schema/core"
dataDirectory="${activemq.base}" tmpDataDirectory="${activemq.base}/tmp"
startAsync="false" start="false" brokerName="${instanceName}">
<!-- The managementContext is used to configure how ActiveMQ is exposed
in JMX. By default, ActiveMQ uses the MBean server that is started by the
JVM. For more information, see: http://activemq.apache.org/jmx.html -->
<managementContext>
<managementContext createConnector="${activemq.jmx.createConnector}"
connectorPort="${activemq.jmx.port}" connectorHost="${activemq.jmx.host}" />
</managementContext>
<!--destinationInterceptors>
<virtualDestinationInterceptor>
<virtualDestinations>
<virtualTopic name=">" prefix="Consumer.*.VirtualTopic."
selectorAware="false" />
</virtualDestinations>
</virtualDestinationInterceptor>
</destinationInterceptors-->
<!-- Configure message persistence for the broker. The default persistence
mechanism is the KahaDB store (identified by the kahaDB tag). For more information,
see: http://activemq.apache.org/persistence.html -->
<amq:persistenceAdapter>
<kahaDB directory="${activemq.base}/kahadb"
lockKeepAlivePeriod="0" />
<!-- <jdbcPersistenceAdapter dataDirectory="activemq-data" dataSource="#postgres-ds"
lockKeepAlivePeriod="0" /> -->
</amq:persistenceAdapter>
<!-- The systemUsage controls the maximum amount of space the broker will
use before slowing down producers. For more information, see: http://activemq.apache.org/producer-flow-control.html -->
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="${activemq.broker.systemUsage.memoryUsage}" />
</memoryUsage>
<storeUsage>
<storeUsage limit="${activemq.broker.systemUsage.storeUsage}" />
</storeUsage>
<tempUsage>
<tempUsage limit="${activemq.broker.systemUsage.tempUsage}" />
</tempUsage>
</systemUsage>
</systemUsage>
<!-- The transport connectors expose ActiveMQ over a given protocol to
clients and other brokers. For more information, see: http://activemq.apache.org/configuring-transports.html -->
<transportConnectors>
<transportConnector name="openwire"
uri="${activemq.transportConnectors.server.uri}" discoveryUri="${activemq.transportConnectors.server.discoveryURI}" />
</transportConnectors>
<networkConnectors xmlns="http://activemq.apache.org/schema/core">
<networkConnector
uri="${activemq.transportConnectors.server.discoveryURI}" />
</networkConnectors>
<!-- destroy the spring context on shutdown to stop jetty -->
<shutdownHooks>
<bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
</shutdownHooks>
</broker>
<!-- This xbean configuration file supports all the standard spring xml
configuration options -->
<!-- <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource"> -->
<!-- <property name="serverName" value="localhost" /> -->
<!-- <property name="databaseName" value="activemq" /> -->
<!-- <property name="portNumber" value="5432" /> -->
<!-- <property name="user" value="postgres" /> -->
<!-- <property name="password" value="postgres" /> -->
<!-- <property name="dataSourceName" value="postgres" /> -->
<!-- <property name="initialConnections" value="1" /> -->
<!-- <property name="maxConnections" value="30" /> -->
<!-- </bean> -->
<!-- Oracle DataSource Sample Setup -->
<!-- <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@localhost:1521:AMQDB"/> <property
name="username" value="scott"/> <property name="password" value="tiger"/>
<property name="poolPreparedStatements" value="true"/> </bean> -->
</beans>