blob: 9440f4faf4a4afd591bb52fddc5c56978bebd89e [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 and Queues is NOT restricted -->
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry topic=">" read="ducc-admin" write="ducc-admin" admin="ducc-admin" />
<authorizationEntry queue=">" read="ducc-admin" write="ducc-admin" admin="ducc-admin" />
<!-- The following should be used ONLY for cluster simulation testing. -->
<!-- The megas use this broker as an application broker for the simulated services. -->
<authorizationEntry queue=">" read="anonymous" write="anonymous" admin="anonymous" />
<authorizationEntry topic="ActiveMQ.Advisory.>" read="anonymous" write="anonymous" admin="anonymous"/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
</plugins>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:${DUCC_AMQ_PORT}?${DUCC_AMQ_DECORATION}"/>
</transportConnectors>
</broker>
</beans>