blob: 239bfc50a23e9cd83876e52143129d2a1b2693de [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<!-- bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/-->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="file:${DUCC_BROKER_CREDENTIALS_FILE}"/>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core" persistent="false">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="false" optimizedDispatch="true">
<pendingSubscriberPolicy>
<vmCursor />
</pendingSubscriberPolicy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="false" optimizedDispatch="true" maxPageSize="2000">
<pendingQueuePolicy>
<vmQueueCursor/>
</pendingQueuePolicy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<managementContext>
<managementContext createConnector="true" connectorPort="${DUCC_AMQ_JMX_PORT}"/>
</managementContext>
<systemUsage>
<systemUsage>
<memoryUsage>
<!-- Memory for incoming messages before going to broker's Store -->
<memoryUsage limit="500 mb"/>
</memoryUsage>
<storeUsage>
<!-- Broker's memory where messages are stored -->
<!-- before being dispatched to consumers -->
<storeUsage limit="1 gb" name="foo"/>
</storeUsage>
<tempUsage>
<!-- Disk space dedicated to persistent messages -->
<!-- Currently not used by Ducc -->
<tempUsage limit="500 mb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<plugins>
<!-- Configure authentication; Username, passwords and groups -->
<!-- The anonymousAccessAllowed=true - clients connecting with no username or password -->
<!-- will be auto assigned to username 'annonymous' and group 'annonymous' -->
<simpleAuthenticationPlugin anonymousAccessAllowed="true">
<users>
<authenticationUser username="${ducc.broker.admin.username}" password="${ducc.broker.admin.password}"
groups="ducc-admin"/>
</users>
</simpleAuthenticationPlugin>
<!-- Configure authorization -->
<!-- Creating and writing to Topics is restricted to users in ducc-admin group -->
<!-- Everyone can read from, write to, and create queues -->
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry topic=">" read="anonymous,ducc-admin" write="ducc-admin" admin="ducc-admin" />
<authorizationEntry queue=">" read="anonymous,ducc-admin" write="anonymous,ducc-admin" admin="anonymous,ducc-admin" />
<authorizationEntry topic="ActiveMQ.Advisory.>" read="anonymous,ducc-admin" write="anonymous,ducc-admin" admin="anonymous,ducc-admin"/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
</plugins>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:${DUCC_AMQ_PORT}?${DUCC_AMQ_DECORATION}"/>
</transportConnectors>
</broker>
</beans>