Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 150 lines (128 sloc) 6.47 kb
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 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
<!--
This file is an example configuration file for Apache ActiveMQ 5.6 or greater.
It is intended for users of the RadioVIS/RadioDNS system.

Note that 5.5 features a bug which prevents it from working properly with forward-slash destinations.
Therefore, use the 5.6 stable (when it comes out) or snapshots.

Based off the ActiveMQ distribution example configuration file

-->
<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">
        <property name="locations">
            <value>file:${activemq.base}/conf/credentials.properties</value>
        </property>
    </bean>
    <!--
The <broker> element is used to configure the ActiveMQ broker.

Note for RadioVIS we've disabled persistency entirely for this broker.
-->
    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true" persistent="false">

        <!--
Don't do much here except for disabling producer flow control (because
we're trying to do mass distribution, not reliable messaging) and setting
our slow consumer strategy to drop slow clients.

We also up the memory limit and enable the VM cursor. Since we're sending
non-persistent messages, these limits are used.
-->
        <destinationPolicy>
            <policyMap>
              <policyEntries>
                <policyEntry topic=">" producerFlowControl="false" memoryLimit="16mb">
                  <pendingSubscriberPolicy>
                    <vmCursor />
                  </pendingSubscriberPolicy>
                  <slowConsumerStrategy>
                    <abortSlowConsumerStrategy/>
                  </slowConsumerStrategy>
                </policyEntry>
                <policyEntry queue=">" producerFlowControl="false" memoryLimit="16mb">
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy>



        <!--
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="false"/>
        </managementContext>
        <!--
Set up a few plugins
-->
        <plugins>
            <!--
This plugin handles what authenticated users can do - by default,
anyone can read, only admins can write. Advisory topics can be
written to and managed by guests, of course.
-->
            <authorizationPlugin>
                <map>
                    <authorizationMap>
                        <authorizationEntries>
                            <authorizationEntry queue=">" read="guests,admins" write="admins" admin="admins" />
                            <authorizationEntry topic=">" read="guests,admins" write="admins" admin="admins" />
                            <authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users,admins" write="guests,users,admins" admin="guests,users,admins"/>
                        </authorizationEntries>
                    </authorizationMap>
                </map>
              </authorizationPlugin>
            <!--
This plugin handles our RadioVIS usage of / in topic names as opposed to .
-->
            <destinationPathSeparatorPlugin/>
            <!--
And finally we need to authenticate who gets let in! We permit anonymous access
(mapped to guest/guests) and set up a system account for our RadioVIS connector.
-->
            <simpleAuthenticationPlugin anonymousAccessAllowed="true" anonymousUser="guest" anonymousGroup="guests">
                <users>
                    <authenticationUser username="system" password="someverysecretpasswordchangeme" groups="admins"/>
                    <authenticationUser username="guest" password="guest" groups="guests"/>
                </users>
            </simpleAuthenticationPlugin>

        </plugins>

        <!--
Since we're not using PFC (see our destinationPolicy block) and using
non-persistent messages, these limits are not all relevant to most
RadioVIS operations.

See http://activemq.apache.org/producer-flow-control.html for more info.
-->
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="64 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="1 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="128 mb"/>
                </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

We enable Stomp (using the New I/O version in ActiveMQ) and WebSockets.
-->
        <transportConnectors>
            <transportConnector name="stomp+nio" uri="stomp+nio://0.0.0.0:61613?transport.closeAsync=false"/>
            <transportConnector name="websocket" uri="ws://0.0.0.0:61623"/>
        </transportConnectors>

    </broker>

    <!--
Enable web consoles, REST and Ajax APIs and demos

Look at http://this-host:8161/admin for the web console.
Comment this out if you're not using it.
-->
    <import resource="jetty.xml"/>

</beans>
Something went wrong with that request. Please try again.