|
| 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 | +<beans |
| 18 | + xmlns="http://www.springframework.org/schema/beans" |
| 19 | + xmlns:amq="http://activemq.apache.org/schema/core" |
| 20 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 21 | + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd |
| 22 | + http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> |
| 23 | + |
| 24 | + <!-- Allows us to use system properties as variables in this configuration file --> |
| 25 | + <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
| 26 | + <property name="locations"> |
| 27 | + <value>file:${activemq.conf}/credentials.properties</value> |
| 28 | + </property> |
| 29 | + </bean> |
| 30 | + |
| 31 | + <!-- |
| 32 | + The <broker> element is used to configure the ActiveMQ broker. |
| 33 | + --> |
| 34 | + <broker xmlns="http://activemq.apache.org/schema/core" |
| 35 | + brokerName="<%= scope.lookupvar('::openshift_origin::msgserver_hostname') %>" |
| 36 | + useJmx="true" |
| 37 | + dataDirectory="${activemq.data}" |
| 38 | + schedulePeriodForDestinationPurge="60000"> |
| 39 | + <!-- |
| 40 | + For better performances use VM cursor and small memory limit. |
| 41 | + For more information, see: |
| 42 | + http://activemq.apache.org/message-cursors.html |
| 43 | + --> |
| 44 | + |
| 45 | + <destinationPolicy> |
| 46 | + <policyMap> |
| 47 | + <policyEntries> |
| 48 | + <policyEntry topic=">" producerFlowControl="false"/> |
| 49 | + <policyEntry queue="*.reply.>" gcInactiveDestinations="true" |
| 50 | + inactiveTimoutBeforeGC="300000" /> |
| 51 | + </policyEntries> |
| 52 | + </policyMap> |
| 53 | + </destinationPolicy> |
| 54 | + |
| 55 | + |
| 56 | + <!-- |
| 57 | + The managementContext is used to configure how ActiveMQ is exposed in |
| 58 | + JMX. By default, ActiveMQ uses the MBean server that is started by |
| 59 | + the JVM. For more information, see: |
| 60 | +
|
| 61 | + http://activemq.apache.org/jmx.html |
| 62 | + --> |
| 63 | + <managementContext> |
| 64 | + <managementContext createConnector="false"/> |
| 65 | + </managementContext> |
| 66 | + |
| 67 | + <networkConnectors> |
| 68 | +<% @cluster_remote_members.each do |cluster_remote_member| -%> |
| 69 | + <networkConnector name="<%= scope.lookupvar('::openshift_origin::msgserver_hostname') %>-<%= cluster_remote_member %>-topic" uri="static:(tcp://<%= cluster_remote_member %>:61616)" userName="amquser" password="<%= scope.lookupvar('::openshift_origin::msgserver_password') %>"> |
| 70 | + <excludedDestinations><queue physicalName=">" /></excludedDestinations> |
| 71 | + </networkConnector> |
| 72 | + <networkConnector name="<%= scope.lookupvar('::openshift_origin::msgserver_hostname') %>-<%= cluster_remote_member %>-queue" uri="static:(tcp://<%= cluster_remote_member %>:61616)" userName="amquser" password="<%= scope.lookupvar('::openshift_origin::msgserver_password') %>" |
| 73 | + conduitSubscriptions="false"> |
| 74 | + <excludedDestinations><topic physicalName=">" /></excludedDestinations> |
| 75 | + </networkConnector> |
| 76 | +<% end -%> |
| 77 | + </networkConnectors> |
| 78 | + |
| 79 | + <plugins> |
| 80 | + <statisticsBrokerPlugin/> |
| 81 | + <simpleAuthenticationPlugin> |
| 82 | + <users> |
| 83 | + <authenticationUser username="<%= scope.lookupvar('::openshift_origin::mcollective_user') %>" password="<%= scope.lookupvar('::openshift_origin::mcollective_password') %>" groups="mcollective,everyone"/> |
| 84 | + <authenticationUser username="amquser" password="<%= scope.lookupvar('::openshift_origin::msgserver_password') %>" groups="admins,everyone"/> |
| 85 | + <authenticationUser username="admin" password="<%= scope.lookupvar('::openshift_origin::msgserver_admin_password') %>" groups="mcollective,admin,everyone"/> |
| 86 | + </users> |
| 87 | + </simpleAuthenticationPlugin> |
| 88 | + <authorizationPlugin> |
| 89 | + <map> |
| 90 | + <authorizationMap> |
| 91 | + <authorizationEntries> |
| 92 | + <authorizationEntry queue=">" write="admins" read="admins" admin="admins" /> |
| 93 | + <authorizationEntry topic=">" write="admins" read="admins" admin="admins" /> |
| 94 | + <authorizationEntry topic="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" /> |
| 95 | + <authorizationEntry queue="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" /> |
| 96 | + <authorizationEntry topic="ActiveMQ.Advisory.>" read="everyone" write="everyone" admin="everyone"/> |
| 97 | + </authorizationEntries> |
| 98 | + </authorizationMap> |
| 99 | + </map> |
| 100 | + </authorizationPlugin> |
| 101 | + </plugins> |
| 102 | + |
| 103 | + <!-- |
| 104 | + The systemUsage controls the maximum amount of space the broker will |
| 105 | + use before slowing down producers. For more information, see: |
| 106 | + http://activemq.apache.org/producer-flow-control.html |
| 107 | + If using ActiveMQ embedded - the following limits could safely be used: |
| 108 | +
|
| 109 | + <systemUsage> |
| 110 | + <systemUsage> |
| 111 | + <memoryUsage> |
| 112 | + <memoryUsage limit="20 mb"/> |
| 113 | + </memoryUsage> |
| 114 | + <storeUsage> |
| 115 | + <storeUsage limit="1 gb"/> |
| 116 | + </storeUsage> |
| 117 | + <tempUsage> |
| 118 | + <tempUsage limit="100 mb"/> |
| 119 | + </tempUsage> |
| 120 | + </systemUsage> |
| 121 | + </systemUsage> |
| 122 | + --> |
| 123 | + <systemUsage> |
| 124 | + <systemUsage> |
| 125 | + <memoryUsage> |
| 126 | + <memoryUsage limit="64 mb"/> |
| 127 | + </memoryUsage> |
| 128 | + <storeUsage> |
| 129 | + <storeUsage limit="100 gb"/> |
| 130 | + </storeUsage> |
| 131 | + <tempUsage> |
| 132 | + <tempUsage limit="50 gb"/> |
| 133 | + </tempUsage> |
| 134 | + </systemUsage> |
| 135 | + </systemUsage> |
| 136 | + |
| 137 | + <!-- |
| 138 | + The transport connectors expose ActiveMQ over a given protocol to |
| 139 | + clients and other brokers. For more information, see: |
| 140 | +
|
| 141 | + http://activemq.apache.org/configuring-transports.html |
| 142 | + --> |
| 143 | + <transportConnectors> |
| 144 | + <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/> |
| 145 | + <transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/> |
| 146 | + </transportConnectors> |
| 147 | + |
| 148 | + </broker> |
| 149 | + |
| 150 | + <!-- |
| 151 | + Enable web consoles, REST and Ajax APIs and demos |
| 152 | +
|
| 153 | + Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details |
| 154 | + --> |
| 155 | + <import resource="jetty.xml"/> |
| 156 | + |
| 157 | +</beans> |
| 158 | +<!-- END SNIPPET: example --> |
0 commit comments