https://issues.apache.org/activemq/browse/AMQ-1894 - tidying up configurations and inserting comments

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@812481 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2009-09-08 12:35:40 +00:00
parent 2b0a194416
commit f6199fe136
11 changed files with 253 additions and 83 deletions

View File

@ -14,15 +14,20 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!--
Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
For more information, see:
http://camel.apache.org
Include this file in your configuration to enable Camel
e.g. <import resource="activemq-camel.xml"/>
-->
<beans <beans
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<!--
Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
For more details see
http://activemq.apache.org/enterprise-integration-patterns.html
-->
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<!-- You can use a <package> element for each root package to search for Java routes --> <!-- You can use a <package> element for each root package to search for Java routes -->
@ -38,7 +43,7 @@
<!-- <!--
Lets configure some Camel endpoints Lets configure some Camel endpoints
http://activemq.apache.org/camel/components.html http://camel.apache.org/components.html
--> -->
<!-- configure the camel activemq component to use the current broker --> <!-- configure the camel activemq component to use the current broker -->

View File

@ -14,10 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<beans>
<!-- <!--
An embedded servlet engine for serving up the Admin consoles, REST and Ajax APIs and some demos An embedded servlet engine for serving up the Admin consoles, REST and Ajax APIs and some demos
Include this file in your configuration to enable ActiveMQ web components
e.g. <import resource="activemq-jetty.xml"/>
--> -->
<beans>
<jetty xmlns="http://mortbay.com/schemas/jetty/1.0"> <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
<connectors> <connectors>
<nioConnector port="8161"/> <nioConnector port="8161"/>

View File

@ -22,13 +22,14 @@
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.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 --> <!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> <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. The <broker> element is used to configure the ActiveMQ broker.
Tips:
- Change the brokerName attribute to something unique
--> -->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data"> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data">
@ -51,15 +52,28 @@
http://activemq.apache.org/persistence.html http://activemq.apache.org/persistence.html
--> -->
<persistenceAdapter> <persistenceAdapter>
<kahaDB directory="${activemq.base}/data/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" /> <kahaDB directory="${activemq.base}/data/kahadb"/>
</persistenceAdapter> </persistenceAdapter>
<!-- <!--
It's advisable to turn on producer flow control in the production system
The systemUsage controls the maximum amount of space the broker will The systemUsage controls the maximum amount of space the broker will
use before slowing down producers. For more information, see: use before slowing down producers. For more information, see:
http://activemq.apache.org/producer-flow-control.html http://activemq.apache.org/producer-flow-control.html
-->
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue=">" producerFlowControl="true" />
<policyEntry topic=">" producerFlowControl="true" />
</policyEntries>
</policyMap>
</destinationPolicy>
<systemUsage> <systemUsage>
<systemUsage> <systemUsage>
<memoryUsage> <memoryUsage>
@ -73,7 +87,7 @@
</tempUsage> </tempUsage>
</systemUsage> </systemUsage>
</systemUsage> </systemUsage>
-->
<!-- <!--
The transport connectors expose ActiveMQ over a given protocol to The transport connectors expose ActiveMQ over a given protocol to
@ -97,6 +111,7 @@
<!-- <!--
Enable web consoles, REST and Ajax APIs and demos Enable web consoles, REST and Ajax APIs and demos
Take a look at activemq-jetty.xml for more details Take a look at activemq-jetty.xml for more details
<import resource="activemq-jetty.xml"/>
--> -->
<import resource="activemq-jetty.xml"/>
</beans> </beans>

View File

@ -14,6 +14,17 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!--
Communicate with a broker using command agent over XMPP
For more information, see:
http://activemq.apache.org/command-agent.html and
http://activemq.apache.org/xmpp.html
To run ActiveMQ with this configuration add xbean:conf/activemq-command.xml to your command
e.g. $ bin/activemq xbean:conf/activemq-command.xml
-->
<beans> <beans>
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="command-broker" dataDirectory="${activemq.base}/data"> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="command-broker" dataDirectory="${activemq.base}/data">
<managementContext> <managementContext>
@ -25,6 +36,7 @@
<transportConnector name="xmpp" uri="xmpp://localhost:61222"/> <transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
</transportConnectors> </transportConnectors>
</broker> </broker>
<!-- Create a command agent --> <!-- Create a command agent -->
<commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost"/> <commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost"/>
</beans> </beans>

View File

@ -14,6 +14,13 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!--
Demonstrates various ActiveMQ configuration options
To run ActiveMQ with this configuration add xbean:conf/activemq-demo.xml to your command
e.g. $ bin/activemq xbean:conf/activemq-demo.xml
-->
<beans <beans
xmlns="http://www.springframework.org/schema/beans" xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:amq="http://activemq.apache.org/schema/core"

View File

@ -14,6 +14,22 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!--
Create a dynamic network of brokers
For more information, see:
http://activemq.apache.org/networks-of-brokers.html
To run this example network of ActiveMQ brokers run
$ bin/activemq xbean:conf/activemq-dynamic-network-broker1.xml
and
$ bin/activemq xbean:conf/activemq-dynamic-network-broker2.xml
in separate consoles
-->
<beans <beans
xmlns="http://www.springframework.org/schema/beans" xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:amq="http://activemq.apache.org/schema/core"
@ -25,6 +41,32 @@
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker1" dataDirectory="${activemq.base}/data"> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker1" dataDirectory="${activemq.base}/data">
<!-- First let's configure connectors -->
<!--
Configure network connector to use multicast protocol
For more information, see
http://activemq.apache.org/multicast-transport-reference.html
-->
<networkConnectors>
<networkConnector uri="multicast://default"
dynamicOnly="true"
networkTTL="3"
prefetchSize="1"
decreaseNetworkConsumerPriority="true" />
</networkConnectors>
<!--
The transport connectors ActiveMQ will listen to
Configure discovery URI to use multicast protocol
-->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default" />
</transportConnectors>
<!-- Now configure the rest of the desired broker behavior -->
<!-- Destination specific policies using destination names or wildcards --> <!-- Destination specific policies using destination names or wildcards -->
<destinationPolicy> <destinationPolicy>
<policyMap> <policyMap>
@ -45,19 +87,11 @@
<managementContext createConnector="true"/> <managementContext createConnector="true"/>
</managementContext> </managementContext>
<networkConnectors>
<networkConnector uri="multicast://default"
dynamicOnly="true"
networkTTL="3"
prefetchSize="1"
decreaseNetworkConsumerPriority="true" />
</networkConnectors>
<persistenceAdapter> <persistenceAdapter>
<kahaDB directory="${activemq.base}/data/dynamic-broker1/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" /> <kahaDB directory="${activemq.base}/data/dynamic-broker1/kahadb"/>
</persistenceAdapter> </persistenceAdapter>
<!-- The maximum about of space the broker will use before slowing down producers --> <!-- The maximum amount of space the broker will use before slowing down producers -->
<systemUsage> <systemUsage>
<systemUsage> <systemUsage>
<memoryUsage> <memoryUsage>
@ -72,12 +106,6 @@
</systemUsage> </systemUsage>
</systemUsage> </systemUsage>
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default" />
</transportConnectors>
</broker> </broker>
</beans> </beans>

View File

@ -14,6 +14,22 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!--
Create a dynamic network of brokers
For more information, see:
http://activemq.apache.org/networks-of-brokers.html
To run this example network of ActiveMQ brokers run
$ bin/activemq xbean:conf/activemq-dynamic-network-broker1.xml
and
$ bin/activemq xbean:conf/activemq-dynamic-network-broker2.xml
in separate consoles
-->
<beans <beans
xmlns="http://www.springframework.org/schema/beans" xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:amq="http://activemq.apache.org/schema/core"
@ -26,6 +42,32 @@
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker2" dataDirectory="${activemq.base}/data"> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker2" dataDirectory="${activemq.base}/data">
<!-- First let's configure connectors -->
<!--
Configure network connector to use multicast protocol
For more information, see
http://activemq.apache.org/multicast-transport-reference.html
-->
<networkConnectors>
<networkConnector uri="multicast://default"
dynamicOnly="true"
networkTTL="3"
prefetchSize="1"
decreaseNetworkConsumerPriority="true" />
</networkConnectors>
<!--
The transport connectors ActiveMQ will listen to
Configure discovery URI to use multicast protocol
-->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61618" discoveryUri="multicast://default" />
</transportConnectors>
<!-- Now configure the rest of the desired broker behavior -->
<!-- Destination specific policies using destination names or wildcards --> <!-- Destination specific policies using destination names or wildcards -->
<destinationPolicy> <destinationPolicy>
<policyMap> <policyMap>
@ -46,19 +88,11 @@
<managementContext createConnector="true" connectorPort="1100"/> <managementContext createConnector="true" connectorPort="1100"/>
</managementContext> </managementContext>
<networkConnectors>
<networkConnector uri="multicast://default"
dynamicOnly="true"
networkTTL="3"
prefetchSize="1"
decreaseNetworkConsumerPriority="true" />
</networkConnectors>
<persistenceAdapter> <persistenceAdapter>
<kahaDB directory="${activemq.base}/data/dynamic-broker2/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" /> <kahaDB directory="${activemq.base}/data/dynamic-broker2/kahadb" />
</persistenceAdapter> </persistenceAdapter>
<!-- The maximum about of space the broker will use before slowing down producers --> <!-- The maximum amount of space the broker will use before slowing down producers -->
<systemUsage> <systemUsage>
<systemUsage> <systemUsage>
<memoryUsage> <memoryUsage>
@ -73,12 +107,6 @@
</systemUsage> </systemUsage>
</systemUsage> </systemUsage>
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61618" discoveryUri="multicast://default" />
</transportConnectors>
</broker> </broker>
</beans> </beans>

View File

@ -14,11 +14,21 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!--
Use JDBC for message persistence
For more information, see:
http://activemq.apache.org/persistence.html
To run ActiveMQ with this configuration add xbean:conf/activemq-jdbc.xml to your command
e.g. $ bin/activemq xbean:conf/activemq-jdbc.xml
-->
<beans> <beans>
<broker useJmx="false" brokerName="jdbcBroker" xmlns="http://activemq.apache.org/schema/core"> <broker useJmx="false" brokerName="jdbcBroker" xmlns="http://activemq.apache.org/schema/core">
<persistenceAdapter> <persistenceAdapter>
<jdbcPersistenceAdapter dataSource="#derby-ds"/> <journaledJDBC dataDirectory="${activemq.base}/data" dataSource="#derby-ds"/>
</persistenceAdapter> </persistenceAdapter>
<transportConnectors> <transportConnectors>

View File

@ -15,6 +15,16 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!--
Secure ActiveMQ broker
For more information, see:
http://activemq.apache.org/security.html
To run ActiveMQ with this configuration add xbean:conf/activemq-security.xml to your command
e.g. $ bin/activemq xbean:conf/activemq-security.xml
-->
<beans <beans
xmlns="http://www.springframework.org/schema/beans" xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:amq="http://activemq.apache.org/schema/core"
@ -31,6 +41,7 @@
<broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core"> <broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core">
<plugins> <plugins>
<!-- Configure authentication; Username, passwords and groups -->
<simpleAuthenticationPlugin> <simpleAuthenticationPlugin>
<users> <users>
<authenticationUser username="system" password="manager" <authenticationUser username="system" password="manager"
@ -42,7 +53,7 @@
</simpleAuthenticationPlugin> </simpleAuthenticationPlugin>
<!-- lets configure a destination based authorization mechanism --> <!-- Lets configure a destination based authorization mechanism -->
<authorizationPlugin> <authorizationPlugin>
<map> <map>
<authorizationMap> <authorizationMap>
@ -70,8 +81,14 @@
</broker> </broker>
<!--
Configure command agent to be used in secured broker environment
Notice how we used ${activemq.username} and ${activemq.password} configured in credential.properties
-->
<commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost" username="${activemq.username}" password="${activemq.password}"/> <commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost" username="${activemq.username}" password="${activemq.password}"/>
<!-- Use Web applications and Camel in secured broker environment -->
<import resource="activemq-jetty.xml"/> <import resource="activemq-jetty.xml"/>
<import resource="activemq-camel.xml"/>
</beans> </beans>

View File

@ -14,6 +14,22 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!--
Create a static network of brokers
For more information, see:
http://activemq.apache.org/networks-of-brokers.html
To run this example network of ActiveMQ brokers run
$ bin/activemq xbean:conf/activemq-static-network-broker1.xml
and
$ bin/activemq xbean:conf/activemq-static-network-broker2.xml
in separate consoles
-->
<beans <beans
xmlns="http://www.springframework.org/schema/beans" xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:amq="http://activemq.apache.org/schema/core"
@ -27,6 +43,23 @@
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.base}/data"> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.base}/data">
<!-- First let's configure connectors -->
<!--
The store and forward broker networks ActiveMQ will listen to.
We'll leave it empty as duplex network will be configured by another broker
Take a look at activemq-static_network-broker2.xml for example
-->
<networkConnectors>
</networkConnectors>
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
</transportConnectors>
<!-- Now configure the rest of the desired broker behavior -->
<!-- Destination specific policies using destination names or wildcards --> <!-- Destination specific policies using destination names or wildcards -->
<destinationPolicy> <destinationPolicy>
<policyMap> <policyMap>
@ -47,15 +80,11 @@
<managementContext createConnector="true"/> <managementContext createConnector="true"/>
</managementContext> </managementContext>
<!-- The store and forward broker networks ActiveMQ will listen to -->
<networkConnectors>
</networkConnectors>
<persistenceAdapter> <persistenceAdapter>
<kahaDB directory="${activemq.base}/data/static-broker1/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" /> <kahaDB directory="${activemq.base}/data/static-broker1/kahadb" />
</persistenceAdapter> </persistenceAdapter>
<!-- The maximum about of space the broker will use before slowing down producers --> <!-- The maximum amount of space the broker will use before slowing down producers -->
<systemUsage> <systemUsage>
<systemUsage> <systemUsage>
<memoryUsage> <memoryUsage>
@ -70,12 +99,6 @@
</systemUsage> </systemUsage>
</systemUsage> </systemUsage>
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
</transportConnectors>
</broker> </broker>
</beans> </beans>

View File

@ -14,6 +14,22 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!--
Create a static network of brokers
For more information, see:
http://activemq.apache.org/networks-of-brokers.html
To run this example network of ActiveMQ brokers run
$ bin/activemq xbean:conf/activemq-static-network-broker1.xml
and
$ bin/activemq xbean:conf/activemq-static-network-broker2.xml
in separate consoles
-->
<beans <beans
xmlns="http://www.springframework.org/schema/beans" xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core" xmlns:amq="http://activemq.apache.org/schema/core"
@ -27,6 +43,23 @@
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.base}/data"> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.base}/data">
<!-- First let's configure connectors -->
<!--
The store and forward broker networks ActiveMQ will listen to
Create a duplex connector to the first broker
-->
<networkConnectors>
<networkConnector uri="static:(tcp://localhost:61616)" duplex="true"/>
</networkConnectors>
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61618"/>
</transportConnectors>
<!-- Now configure the rest of the desired broker behavior -->
<!-- Destination specific policies using destination names or wildcards --> <!-- Destination specific policies using destination names or wildcards -->
<destinationPolicy> <destinationPolicy>
<policyMap> <policyMap>
@ -47,16 +80,11 @@
<managementContext createConnector="true" connectorPort="1100"/> <managementContext createConnector="true" connectorPort="1100"/>
</managementContext> </managementContext>
<!-- The store and forward broker networks ActiveMQ will listen to -->
<networkConnectors>
<networkConnector uri="static:(tcp://localhost:61616)" duplex="true" prefetchSize="1"/>
</networkConnectors>
<persistenceAdapter> <persistenceAdapter>
<kahaDB directory="${activemq.base}/data/static-broker2/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" /> <kahaDB directory="${activemq.base}/data/static-broker2/kahadb" />
</persistenceAdapter> </persistenceAdapter>
<!-- The maximum about of space the broker will use before slowing down producers --> <!-- The maximum amount of space the broker will use before slowing down producers -->
<systemUsage> <systemUsage>
<systemUsage> <systemUsage>
<memoryUsage> <memoryUsage>
@ -71,12 +99,6 @@
</systemUsage> </systemUsage>
</systemUsage> </systemUsage>
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61618"/>
</transportConnectors>
</broker> </broker>
</beans> </beans>