-
Notifications
You must be signed in to change notification settings - Fork 7
/
activemq.xml
64 lines (56 loc) · 2.97 KB
/
activemq.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
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.8.0.xsd">
<!-- Allows us to use external properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>file:conf/your.activemq.properties</value>
</property>
<property name="properties">
<props>
<prop key="conf.db.host">database-host:database-port</prop>
<prop key="conf.db.un">database-username</prop>
<prop key="conf.db.pw">database-password</prop>
<prop key="data.dir">data</prop>
</props>
</property>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core"
useJmx="true"
brokerName="mybroker"
useShutdownHook="false"
persistent="true"
start="false"
schedulerSupport="false"
enableStatistics="false"
offlineDurableSubscriberTimeout="259200000"
offlineDurableSubscriberTaskSchedule="3600000">
<!--persistenceAdapter>
<jdbcPersistenceAdapter createTablesOnStartup="false" dataSource="#postgresql-activemq-ds">
<adapter>
<postgresql-jdbc-adapter/>
</adapter>
</jdbcPersistenceAdapter>
</persistenceAdapter-->
<persistenceAdapter>
<kahaDB directory="${data.dir}/activemq-data/kaha" indexCacheSize="20000" ignoreMissingJournalfiles="true" checkForCorruptJournalFiles="true" checksumJournalFiles="true"/>
</persistenceAdapter>
<!-- The transport connectors ActiveMQ will listen to. Set the same for the serverUrl in the tomee.xml file -->
<transportConnectors>
<!--Local broker-->
<transportConnector name="vm" uri="vm://mybroker?waitForStart=30000&async=true"/>
<!--Allow remote connections-->
<transportConnector name="nio" enableStatusMonitor="true" uri="nio://0.0.0.0:54545?soTimeout=60000&daemon=true&keepAlive=true&connectionTimeout=120000&wireFormat.tcpNoDelayEnabled=true&wireFormat.maxInactivityDuration=240000&wireFormat.maxInactivityDurationInitalDelay=120000"/>
</transportConnectors>
</broker>
<!--bean id="postgresql-activemq-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.postgresql.Driver"/>
<property name="url" value="jdbc:postgresql://${conf.db.host}/openejb_activemq"/>
<property name="username" value="${conf.db.un}"/>
<property name="password" value="${conf.db.pw}"/>
<property name="poolPreparedStatements" value="true"/>
</bean-->
</beans>