"Fossies" - the Fresh Open Source Software Archive

Member "WEB-INF/classes/config/activemq.xml" (22 Jul 2020, 5301 Bytes) of package /linux/www/fcrepo-webapp-5.1.1.war:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <beans xmlns="http://www.springframework.org/schema/beans"
    3     xmlns:amq="http://activemq.apache.org/schema/core"
    4     xmlns:context="http://www.springframework.org/schema/context"
    5     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    6     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    7     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
    8     http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
    9 
   10     <context:property-placeholder/>
   11 
   12     <!--
   13         The <broker> element is used to configure the ActiveMQ broker.
   14     -->
   15     <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost">
   16 
   17         <!--
   18             For better performances use VM cursor and small memory limit.
   19             For more information, see:
   20 
   21             http://activemq.apache.org/message-cursors.html
   22 
   23             Also, if your producer is "hanging", it's probably due to producer flow control.
   24             For more information, see:
   25             http://activemq.apache.org/producer-flow-control.html
   26         -->
   27 
   28         <destinationPolicy>
   29             <policyMap>
   30                 <policyEntries>
   31                     <policyEntry topic=">" producerFlowControl="true">
   32                         <!-- The constantPendingMessageLimitStrategy is used to prevent
   33                          slow topic consumers to block producers and affect other consumers
   34                          by limiting the number of messages that are retained
   35                          For more information, see:
   36 
   37                          http://activemq.apache.org/slow-consumer-handling.html
   38 
   39                     -->
   40                         <pendingMessageLimitStrategy>
   41                             <constantPendingMessageLimitStrategy limit="1000"/>
   42                         </pendingMessageLimitStrategy>
   43                     </policyEntry>
   44                     <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
   45                         <!-- Use VM cursor for better latency
   46                        For more information, see:
   47 
   48                        http://activemq.apache.org/message-cursors.html
   49 
   50                   <pendingQueuePolicy>
   51                     <vmQueueCursor/>
   52                   </pendingQueuePolicy>
   53                   -->
   54                     </policyEntry>
   55                 </policyEntries>
   56             </policyMap>
   57         </destinationPolicy>
   58 
   59 
   60         <!--
   61             The managementContext is used to configure how ActiveMQ is exposed in
   62             JMX. By default, ActiveMQ uses the MBean server that is started by
   63             the JVM. For more information, see:
   64 
   65             http://activemq.apache.org/jmx.html
   66         -->
   67         <managementContext>
   68             <managementContext createConnector="false"/>
   69         </managementContext>
   70 
   71         <!--
   72             Configure message persistence for the broker. The default persistence
   73             mechanism is the KahaDB store (identified by the kahaDB tag).
   74             For more information, see:
   75 
   76             http://activemq.apache.org/persistence.html
   77         -->
   78         <persistenceAdapter>
   79             <kahaDB directory="${fcrepo.activemq.directory:ActiveMQ/kahadb}"/>
   80         </persistenceAdapter>
   81 
   82 
   83         <!--
   84             The systemUsage controls the maximum amount of space the broker will
   85             use before slowing down producers. For more information, see:
   86             http://activemq.apache.org/producer-flow-control.html
   87             If using ActiveMQ embedded - the following limits could safely be used:
   88             -->
   89 
   90         <systemUsage>
   91             <systemUsage>
   92                 <memoryUsage>
   93                     <memoryUsage limit="20 mb"/>
   94                 </memoryUsage>
   95                 <storeUsage>
   96                     <storeUsage limit="1 gb"/>
   97                 </storeUsage>
   98                 <tempUsage>
   99                     <tempUsage limit="100 mb"/>
  100                 </tempUsage>
  101             </systemUsage>
  102         </systemUsage>
  103 
  104 
  105         <!--
  106             The transport connectors expose ActiveMQ over a given protocol to
  107             clients and other brokers. For more information, see:
  108 
  109             http://activemq.apache.org/configuring-transports.html
  110         -->
  111         <transportConnectors>
  112             <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
  113             <transportConnector name="openwire"
  114                 uri="tcp://0.0.0.0:${fcrepo.dynamic.jms.port:61616}?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"
  115             />
  116             <transportConnector name="stomp" uri="stomp://0.0.0.0:${fcrepo.dynamic.stomp.port:61613}"/>
  117         </transportConnectors>
  118 
  119         <!-- destroy the spring context on shutdown to stop jetty -->
  120         <shutdownHooks>
  121             <bean xmlns="http://www.springframework.org/schema/beans"
  122                 class="org.apache.activemq.hooks.SpringContextHook"/>
  123         </shutdownHooks>
  124 
  125     </broker>
  126 
  127     <!--
  128         Enable web consoles, REST and Ajax APIs and demos
  129 
  130         Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
  131 
  132     <import resource="jetty.xml"/>
  133     -->
  134 </beans>