Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.17 KB | None | 0 0
  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. <!--
  18.    Simple Broker Configuration (one instance only) to start a broker for
  19.    EPMS feeds availability for multiple clients. It works in conjuction
  20.    with a consumer/producer service to deposit JSON messages into a TOPIC.
  21.  
  22.    SIBS INTERNATIONAL 2016 - contact: support@sibs-international.com
  23. -->
  24. <!-- Last modification on 2017-03-31 20:13:18 by root -->
  25. <beans
  26.        xmlns="http://www.springframework.org/schema/beans"
  27.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  28.        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  29.  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
  30.  
  31.     <!-- Allows accessing the server log -->
  32.     <bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
  33.          lazy-init="false" scope="singleton"
  34.          init-method="start" destroy-method="stop">
  35.     </bean>
  36.  
  37.     <!--
  38.        The <broker> element is used to configure the ActiveMQ broker.
  39.        To delete all messages on startup, add this to the broker: deleteAllMessagesOnStartup="true"
  40.    -->
  41.     <broker xmlns="http://activemq.apache.org/schema/core" brokerName="feeds-broker" dataDirectory="../data"
  42.            offlineDurableSubscriberTimeout="86400000" offlineDurableSubscriberTaskSchedule="3600000" persistent="true">
  43.  
  44.         <!--
  45.            Destinations created on start up for this broker:
  46.            * FEEDS.TOPIC - Topic for EPMS Feeds where consumers will connect.
  47.        -->
  48.         <destinations>
  49.             <queue physicalName="FEEDS.IN.POSVAS"/>
  50.             <topic physicalName="FEEDS.TOPIC"/>
  51.             <queue physicalName="FEEDS.OUT.FORWARD"/>
  52.             <queue physicalName="FEEDS.OUT.BANK.57" />
  53.             <queue physicalName="FEEDS.OUT.PTSP.18" />
  54.         </destinations>
  55.  
  56.         <!-- Feeds forwarding -->
  57.         <destinationInterceptors>
  58.             <virtualDestinationInterceptor>
  59.                 <virtualDestinations>
  60.                     <compositeQueue name="FEEDS.OUT.FORWARD" forwardOnly="true">
  61.                         <forwardTo>
  62.                             <filteredDestination selector="BANK_CODE = 57" queue="FEEDS.OUT.BANK.57"/>
  63.                             <filteredDestination selector="PTSP_CODE = 18" queue="FEEDS.OUT.PTSP.18"/>
  64.                         </forwardTo>
  65.                     </compositeQueue>
  66.                 </virtualDestinations>
  67.             </virtualDestinationInterceptor>
  68.         </destinationInterceptors>
  69.  
  70.         <!--
  71.            The managementContext is used to configure how ActiveMQ is exposed in
  72.            JMX. By default, ActiveMQ uses the MBean server that is started by
  73.            the JVM. For more information, see:
  74.  
  75.            http://activemq.apache.org/jmx.html
  76.        -->
  77.         <managementContext>
  78.             <managementContext createConnector="false"/>
  79.         </managementContext>
  80.  
  81.         <!--
  82.            Configure message persistence for the broker. The default persistence
  83.            mechanism is the KahaDB store (identified by the kahaDB tag).
  84.            For more information, see:
  85.  
  86.            http://activemq.apache.org/persistence.html
  87.        -->
  88.         <persistenceAdapter>
  89.             <kahaDB directory="../data/kahadb"/>
  90.         </persistenceAdapter>
  91.  
  92.  
  93.         <!--
  94.          The systemUsage controls the maximum amount of space the broker will
  95.          use before disabling caching and/or slowing down producers. For more information, see:
  96.          http://activemq.apache.org/producer-flow-control.html
  97.        -->
  98.         <systemUsage>
  99.             <systemUsage>
  100.                 <memoryUsage>
  101.                     <memoryUsage percentOfJvmHeap="70" />
  102.                 </memoryUsage>
  103.                 <storeUsage>
  104.                     <storeUsage limit="190 gb"/>
  105.                 </storeUsage>
  106.                 <tempUsage>
  107.                     <tempUsage limit="50 gb"/>
  108.                 </tempUsage>
  109.             </systemUsage>
  110.         </systemUsage>
  111.  
  112.         <!--
  113.            The transport connectors expose ActiveMQ over a given protocol to
  114.            clients and other brokers. For more information, see:
  115.  
  116.            http://activemq.apache.org/configuring-transports.html
  117.        -->
  118.         <transportConnectors>
  119.             <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
  120.             <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
  121.         </transportConnectors>
  122.  
  123.         <plugins>
  124.             <simpleAuthenticationPlugin>
  125.                 <users>
  126.                     <authenticationUser username="system" password="s1b$m4n4g3r" groups="admins"/>
  127.                     <authenticationUser username="consumer" password="_r1dg3p4$$" groups="consumers"/>
  128.                     <authenticationUser username="posvas" password="pP0$Rv4$D_" groups="posvas"/>
  129.                     <authenticationUser username="bank57" password="mgFkW1OJ3rce4gjKIBsd2tPNqTm1Vsuw" groups="bank57"/>
  130.                     <authenticationUser username="ptsp18" password="Xv1i9hi1jfyUMalBK7XGqi2wHpsKkcdX" groups="ptsp18"/>
  131.                 </users>
  132.             </simpleAuthenticationPlugin>
  133.             <authorizationPlugin>
  134.                 <map>
  135.                     <authorizationMap>
  136.                         <authorizationEntries>
  137.                             <authorizationEntry queue="FEEDS.IN.POSVAS" read="admins,consumers" write="posvas" admin="admins"/>
  138.                             <authorizationEntry topic="FEEDS.TOPIC" read="admins,consumers" write="admins" admin="admins"/>
  139.                             <authorizationEntry queue="FEEDS.OUT.FORWARD" read="admins" write="admins" admin="admins"/>
  140.                             <authorizationEntry queue="FEEDS.OUT.BANK.57" read="admins,bank57" write="admins" admin="admins"/>
  141.                             <authorizationEntry queue="FEEDS.OUT.PTSP.18" read="admins,ptsp18" write="admins" admin="admins"/>
  142.                             <authorizationEntry topic="ActiveMQ.Advisory.>" read="admins,consumers,ptsp18,bank57,posvas" write="admins,consumers,posvas" admin="admins,consumers,ptsp18,bank57,posvas"/>
  143.                         </authorizationEntries>
  144.                     </authorizationMap>
  145.                 </map>
  146.             </authorizationPlugin>
  147.         </plugins>
  148.  
  149.     </broker>
  150. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement