Advertisement
Guest User

broker-master.xml

a guest
Aug 3rd, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 11.89 KB | None | 0 0
  1. <?xml version='1.0'?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements.  See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership.  The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License.  You may obtain a copy of the License at
  10.  
  11.  http://www.apache.org/licenses/LICENSE-2.0
  12.  
  13. Unless required by applicable law or agreed to in writing,
  14. software distributed under the License is distributed on an
  15. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. KIND, either express or implied.  See the License for the
  17. specific language governing permissions and limitations
  18. under the License.
  19. -->
  20.  
  21. <configuration xmlns="urn:activemq"
  22.               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  23.               xmlns:xi="http://www.w3.org/2001/XInclude"
  24.               xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
  25.  
  26.    <core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  27.         xsi:schemaLocation="urn:activemq:core ">
  28.  
  29.       <name>localhost</name>
  30.  
  31.  
  32.       <persistence-enabled>true</persistence-enabled>
  33.  
  34.       <!-- this could be ASYNCIO, MAPPED, NIO
  35.           ASYNCIO: Linux Libaio
  36.           MAPPED: mmap files
  37.           NIO: Plain Java Files
  38.       -->
  39.       <journal-type>NIO</journal-type>
  40.  
  41.       <paging-directory>C:\artemis-data/paging</paging-directory>
  42.  
  43.       <bindings-directory>C:\artemis-data/bindings</bindings-directory>
  44.  
  45.       <journal-directory>C:\artemis-data/journal</journal-directory>
  46.  
  47.       <large-messages-directory>C:\artemis-data/large-messages</large-messages-directory>
  48.  
  49.       <journal-datasync>true</journal-datasync>
  50.  
  51.       <journal-min-files>2</journal-min-files>
  52.  
  53.       <journal-pool-files>10</journal-pool-files>
  54.  
  55.       <journal-file-size>10M</journal-file-size>
  56.      
  57.       <!--
  58.       This value was determined through a calculation.
  59.       Your system could perform 1,79 writes per millisecond
  60.       on the current journal configuration.
  61.       That translates as a sync write every 560000 nanoseconds.
  62.  
  63.       Note: If you specify 0 the system will perform writes directly to the disk.
  64.             We recommend this to be 0 if you are using journalType=MAPPED and ournal-datasync=false.
  65.      -->
  66.       <journal-buffer-timeout>560000</journal-buffer-timeout>
  67.  
  68.  
  69.       <!--
  70.        When using ASYNCIO, this will determine the writing queue depth for libaio.
  71.       -->
  72.       <journal-max-io>1</journal-max-io>
  73.       <!--
  74.        You can verify the network health of a particular NIC by specifying the <network-check-NIC> element.
  75.         <network-check-NIC>theNicName</network-check-NIC>
  76.        -->
  77.  
  78.       <!--
  79.        Use this to use an HTTP server to validate the network
  80.         <network-check-URL-list>http://www.apache.org</network-check-URL-list> -->
  81.  
  82.       <!-- <network-check-period>10000</network-check-period> -->
  83.       <!-- <network-check-timeout>1000</network-check-timeout> -->
  84.  
  85.       <!-- this is a comma separated list, no spaces, just DNS or IPs
  86.           it should accept IPV6
  87.  
  88.           Warning: Make sure you understand your network topology as this is meant to validate if your network is valid.
  89.                    Using IPs that could eventually disappear or be partially visible may defeat the purpose.
  90.                    You can use a list of multiple IPs, and if any successful ping will make the server OK to continue running -->
  91.       <!-- <network-check-list>10.0.0.1</network-check-list> -->
  92.  
  93.       <!-- use this to customize the ping used for ipv4 addresses -->
  94.       <!-- <network-check-ping-command>ping -c 1 -t %d %s</network-check-ping-command> -->
  95.  
  96.       <!-- use this to customize the ping used for ipv6 addresses -->
  97.       <!-- <network-check-ping6-command>ping6 -c 1 %2$s</network-check-ping6-command> -->
  98.  
  99.  
  100.  
  101.     <connectors>
  102.         <!-- Connector used to be announced through cluster connections and notifications -->
  103.         <connector name="artemis">tcp://localhost:61616</connector>
  104.     </connectors>
  105.  
  106.  
  107.  
  108.       <!-- how often we are looking for how many bytes are being used on the disk in ms -->
  109.       <disk-scan-period>5000</disk-scan-period>
  110.  
  111.       <!-- once the disk hits this limit the system will block, or close the connection in certain protocols
  112.           that won't support flow control. -->
  113.       <max-disk-usage>90</max-disk-usage>
  114.  
  115.       <!-- should the broker detect dead locks and other issues -->
  116.       <critical-analyzer>true</critical-analyzer>
  117.  
  118.       <critical-analyzer-timeout>120000</critical-analyzer-timeout>
  119.  
  120.       <critical-analyzer-check-period>60000</critical-analyzer-check-period>
  121.  
  122.       <critical-analyzer-policy>HALT</critical-analyzer-policy>
  123.  
  124.       <!-- the system will enter into page mode once you hit this limit.
  125.           This is an estimate in bytes of how much the messages are using in memory
  126.  
  127.            The system will use half of the available memory (-Xmx) by default for the global-max-size.
  128.            You may specify a different value here if you need to customize it to your needs.
  129.  
  130.            <global-max-size>100Mb</global-max-size>
  131.  
  132.      -->
  133.  
  134.       <acceptors>
  135.  
  136.          <!-- useEpoll means: it will use Netty epoll if you are on a system (Linux) that supports it -->
  137.          <!-- amqpCredits: The number of credits sent to AMQP producers -->
  138.          <!-- amqpLowCredits: The server will send the # credits specified at amqpCredits at this low mark -->
  139.  
  140.          <!-- Note: If an acceptor needs to be compatible with HornetQ and/or Artemis 1.x clients add
  141.                    "anycastPrefix=jms.queue.;multicastPrefix=jms.topic." to the acceptor url.
  142.                    See https://issues.apache.org/jira/browse/ARTEMIS-1644 for more information. -->
  143.  
  144.          <!-- Acceptor for every supported protocol -->
  145.          <acceptor name="artemis">tcp://localhost:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>
  146.  
  147.          <!-- AMQP Acceptor.  Listens on default AMQP port for AMQP traffic.-->
  148.          <acceptor name="amqp">tcp://localhost:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>
  149.  
  150.          <!-- STOMP Acceptor. -->
  151.          <acceptor name="stomp">tcp://localhost:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true</acceptor>
  152.  
  153.          <!-- HornetQ Compatibility Acceptor.  Enables HornetQ Core and STOMP for legacy HornetQ clients. -->
  154.          <acceptor name="hornetq">tcp://localhost:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true</acceptor>
  155.  
  156.          <!-- MQTT Acceptor -->
  157.          <acceptor name="mqtt">tcp://localhost:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>
  158.  
  159.       </acceptors>
  160.  
  161.  
  162.       <cluster-user>test</cluster-user>
  163.  
  164.       <cluster-password>test</cluster-password>
  165.  
  166.       <broadcast-groups>
  167.          <broadcast-group name="bg-group1">
  168.             <group-address>231.7.7.7</group-address>
  169.             <group-port>9876</group-port>
  170.             <broadcast-period>5000</broadcast-period>
  171.             <connector-ref>artemis</connector-ref>
  172.          </broadcast-group>
  173.       </broadcast-groups>
  174.  
  175.       <discovery-groups>
  176.          <discovery-group name="dg-group1">
  177.             <group-address>231.7.7.7</group-address>
  178.             <group-port>9876</group-port>
  179.             <refresh-timeout>10000</refresh-timeout>
  180.          </discovery-group>
  181.       </discovery-groups>
  182.  
  183.       <cluster-connections>
  184.          <cluster-connection name="my-cluster">
  185.             <connector-ref>artemis</connector-ref>
  186.             <message-load-balancing>ON_DEMAND</message-load-balancing>
  187.             <max-hops>0</max-hops>
  188.             <discovery-group-ref discovery-group-name="dg-group1"/>
  189.          </cluster-connection>
  190.       </cluster-connections>
  191.  
  192.  
  193.       <ha-policy>
  194.          <shared-store>
  195.             <master>
  196.                <failover-on-shutdown>true</failover-on-shutdown>
  197.             </master>
  198.          </shared-store>
  199.       </ha-policy>
  200.  
  201.       <security-settings>
  202.          <security-setting match="#">
  203.             <permission type="createNonDurableQueue" roles="amq"/>
  204.             <permission type="deleteNonDurableQueue" roles="amq"/>
  205.             <permission type="createDurableQueue" roles="amq"/>
  206.             <permission type="deleteDurableQueue" roles="amq"/>
  207.             <permission type="createAddress" roles="amq"/>
  208.             <permission type="deleteAddress" roles="amq"/>
  209.             <permission type="consume" roles="amq"/>
  210.             <permission type="browse" roles="amq"/>
  211.             <permission type="send" roles="amq"/>
  212.             <!-- we need this otherwise ./artemis data imp wouldn't work -->
  213.             <permission type="manage" roles="amq"/>
  214.          </security-setting>
  215.       </security-settings>
  216.  
  217.       <address-settings>
  218.          <!-- if you define auto-create on certain queues, management has to be auto-create -->
  219.          <address-setting match="activemq.management#">
  220.             <dead-letter-address>DLQ</dead-letter-address>
  221.             <expiry-address>ExpiryQueue</expiry-address>
  222.             <redelivery-delay>0</redelivery-delay>
  223.             <!-- with -1 only the global-max-size is in use for limiting -->
  224.             <max-size-bytes>-1</max-size-bytes>
  225.             <message-counter-history-day-limit>10</message-counter-history-day-limit>
  226.             <address-full-policy>PAGE</address-full-policy>
  227.             <auto-create-queues>true</auto-create-queues>
  228.             <auto-create-addresses>true</auto-create-addresses>
  229.             <auto-create-jms-queues>true</auto-create-jms-queues>
  230.             <auto-create-jms-topics>true</auto-create-jms-topics>
  231.          </address-setting>
  232.          <!--default for catch all-->
  233.          <address-setting match="#">
  234.             <dead-letter-address>DLQ</dead-letter-address>
  235.             <expiry-address>ExpiryQueue</expiry-address>
  236.             <redelivery-delay>0</redelivery-delay>
  237.             <!-- with -1 only the global-max-size is in use for limiting -->
  238.             <max-size-bytes>-1</max-size-bytes>
  239.             <message-counter-history-day-limit>10</message-counter-history-day-limit>
  240.             <address-full-policy>PAGE</address-full-policy>
  241.             <auto-create-queues>true</auto-create-queues>
  242.             <auto-create-addresses>true</auto-create-addresses>
  243.             <auto-create-jms-queues>true</auto-create-jms-queues>
  244.             <auto-create-jms-topics>true</auto-create-jms-topics>
  245.          </address-setting>
  246.       </address-settings>
  247.  
  248.       <addresses>
  249.          <address name="DLQ">
  250.             <anycast>
  251.                <queue name="DLQ" />
  252.             </anycast>
  253.          </address>
  254.          <address name="ExpiryQueue">
  255.             <anycast>
  256.                <queue name="ExpiryQueue" />
  257.             </anycast>
  258.          </address>
  259.  
  260.       </addresses>
  261.  
  262.  
  263.       <!-- Uncomment the following if you want to use the Standard LoggingActiveMQServerPlugin pluging to log in events
  264.      <broker-plugins>
  265.         <broker-plugin class-name="org.apache.activemq.artemis.core.server.plugin.impl.LoggingActiveMQServerPlugin">
  266.            <property key="LOG_ALL_EVENTS" value="true"/>
  267.            <property key="LOG_CONNECTION_EVENTS" value="true"/>
  268.            <property key="LOG_SESSION_EVENTS" value="true"/>
  269.            <property key="LOG_CONSUMER_EVENTS" value="true"/>
  270.            <property key="LOG_DELIVERING_EVENTS" value="true"/>
  271.            <property key="LOG_SENDING_EVENTS" value="true"/>
  272.            <property key="LOG_INTERNAL_EVENTS" value="true"/>
  273.         </broker-plugin>
  274.      </broker-plugins>
  275.      -->
  276.  
  277.    </core>
  278. </configuration>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement