Repository: activemq Updated Branches: refs/heads/master ad8879d28 -> da0d1168c
add example of optimized mqtt deployment configuration Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/da0d1168 Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/da0d1168 Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/da0d1168 Branch: refs/heads/master Commit: da0d1168c17c5f607cbd9782c52baa19d9fb0cc6 Parents: ad8879d Author: Dejan Bosanac <[email protected]> Authored: Mon Jul 13 15:09:15 2015 +0200 Committer: Dejan Bosanac <[email protected]> Committed: Mon Jul 13 15:09:15 2015 +0200 ---------------------------------------------------------------------- .../src/release/examples/conf/activemq-mqtt.xml | 93 ++++++++++++++++++++ .../examples/conf/activemq-scalability.xml | 2 +- 2 files changed, 94 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/da0d1168/assembly/src/release/examples/conf/activemq-mqtt.xml ---------------------------------------------------------------------- diff --git a/assembly/src/release/examples/conf/activemq-mqtt.xml b/assembly/src/release/examples/conf/activemq-mqtt.xml new file mode 100644 index 0000000..cef998e --- /dev/null +++ b/assembly/src/release/examples/conf/activemq-mqtt.xml @@ -0,0 +1,93 @@ +<!-- + 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. +--> +<!-- + Tune ActiveMQ broker so it can handle large number of queues (tens of thousands) + For more information, see: + http://activemq.apache.org/scaling-queues.html + + Be sure to make necessary changes in your startup script, to + + 1. Give broker enough memory + 2. Disable dedicated task runner + 3. Skip file metadata updates when saving files (can increase performance of KahaDB store) + + e.g. ACTIVEMQ_OPTS="-Xmx2G -Dorg.apache.activemq.UseDedicatedTaskRunner=false -Dorg.apache.activemq.kahaDB.files.skipMetadataUpdate=true" + + To run ActiveMQ with this configuration add xbean:examples/conf/activemq-mqtt.xml to your command + e.g. $ bin/activemq console xbean:examples/conf/activemq-mqtt.xml + --> +<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.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"/> + + <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="false" advisorySupport="false"> + + <!-- + Turn on optimizedDispatch + For more information, see: + http://activemq.apache.org/per-destination-policies.html + --> + <destinationPolicy> + <policyMap> + <policyEntries> + <policyEntry queue=">" optimizedDispatch="true" /> + </policyEntries> + </policyMap> + </destinationPolicy> + + <!-- + In case you want to have some JMX statistics exposed, + you can filter MBeans you're not interested in + + http://activemq.apache.org/jmx.html + --> + <managementContext> + <managementContext createConnector="false" suppressMBean="endpoint=dynamicProducer,endpoint=Consumer,connectionName=*,destinationName=ActiveMQ.Advisory.*"/> + </managementContext> + + <!-- + Use KahaDB for persistence. Try pre-allocating journal files for improved store performance + For more information, see: + http://activemq.apache.org/kahadb.html + --> + <persistenceAdapter> + <kahaDB directory="${activemq.data}/kahadb" enableIndexWriteAsync="true" preallocationStrategy="zeros"/> + </persistenceAdapter> + + <!-- + Use NIO transport + For more information, see: + http://activemq.apache.org/configuring-transports.html#ConfiguringTransports-TheNIOTransport + + Additionally for better scalability, use virtual topics instead of durable subscribers for reliable messages + For more information, see: + http://activemq.apache.org/mqtt.html + + --> + <transportConnectors> + <transportConnector name="mqtt+nio" uri="mqtt+nio://0.0.0.0:1883?transport.subscriptionStrategy=mqtt-virtual-topic-subscriptions"/> + </transportConnectors> + + </broker> + +</beans> http://git-wip-us.apache.org/repos/asf/activemq/blob/da0d1168/assembly/src/release/examples/conf/activemq-scalability.xml ---------------------------------------------------------------------- diff --git a/assembly/src/release/examples/conf/activemq-scalability.xml b/assembly/src/release/examples/conf/activemq-scalability.xml index f47e6c6..0ca2369 100644 --- a/assembly/src/release/examples/conf/activemq-scalability.xml +++ b/assembly/src/release/examples/conf/activemq-scalability.xml @@ -17,7 +17,7 @@ <!-- Tune ActiveMQ broker so it can handle large number of queues (tens of thousands) For more information, see: - http://activemq.apache.org/how-do-i-configure-10s-of-1000s-of-queues-in-a-single-broker-.html + http://activemq.apache.org/scaling-queues.html Be sure to make necessary changes in your startup script, to
