ARTEMIS-3139 Anonymous types in Artemis config XSD

Moves embedded XSD element definitions and associated complexTypes
from XSD element definitions to top-level types available for XML
schema validation in IDEs.
This commit is contained in:
Ryan Highley 2022-06-23 16:38:46 -05:00 committed by clebertsuconic
parent bea8d21ecd
commit 1c987ff129
25 changed files with 2384 additions and 1247 deletions

View File

@ -0,0 +1,69 @@
/*
* 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.
*/
package org.apache.activemq.artemis.core.config.impl;
import org.apache.activemq.artemis.core.server.plugin.ActiveMQServerBasePlugin;
import org.junit.AfterClass;
import org.junit.Assume;
import org.junit.BeforeClass;
public class FileXIncludeSchemaConfigurationTest extends FileConfigurationTest {
public FileXIncludeSchemaConfigurationTest(boolean xxeEnabled) {
super(xxeEnabled);
Assume.assumeTrue(xxeEnabled);
}
@BeforeClass
public static void setupProperties() {
System.setProperty("xincludePath", "./src/test/resources");
System.setProperty("a2Prop", "a2");
System.setProperty("falseProp", "false");
System.setProperty("trueProp", "true");
System.setProperty("ninetyTwoProp", "92");
}
@AfterClass
public static void clearProperties() {
System.clearProperty("xincludePath");
System.clearProperty("a2Prop");
System.clearProperty("falseProp");
System.clearProperty("trueProp");
System.clearProperty("ninetyTwoProp");
}
@Override
public void testSerialize() throws Exception {
// ConfigurationImplTest#testSerialize() assumes the one plugin it registers is the only one in the configuration.
// Check the expected 2 from the include file are present
assertEquals("included broker plugins are not present", 2, conf.getBrokerPlugins().size());
// Clear the list
for (ActiveMQServerBasePlugin plugin : conf.getBrokerPlugins()) {
conf.unRegisterBrokerPlugin(plugin);
}
// Allow the test to proceed
super.testSerialize();
}
@Override
protected String getConfigurationName() {
return "ConfigurationTest-xinclude-schema-config.xml";
}
}

View File

@ -0,0 +1,20 @@
<!--
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.
-->
<acceptors xmlns="urn:activemq:core">
<acceptor>tcp://0.0.0.0:61616?tcpNoDelay=456;connectionTtl=44;connectionsAllowed=${ninetyTwoProp}</acceptor>
<acceptor>vm://0?e1=z1;e2=567;connectionsAllowed=87</acceptor>
</acceptors>

View File

@ -0,0 +1,85 @@
<!--
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.
-->
<address-settings xmlns="urn:activemq:core">
<address-setting match="a1">
<dead-letter-address>a1.1</dead-letter-address>
<expiry-address>a1.2</expiry-address>
<expiry-delay>1</expiry-delay>
<min-expiry-delay>2</min-expiry-delay>
<max-expiry-delay>3</max-expiry-delay>
<redelivery-delay>1</redelivery-delay>
<redelivery-collision-avoidance-factor>0.5</redelivery-collision-avoidance-factor>
<max-size-bytes>817M</max-size-bytes>
<page-size-bytes>817381738</page-size-bytes>
<page-max-cache-size>10</page-max-cache-size>
<message-counter-history-day-limit>4</message-counter-history-day-limit>
<slow-consumer-threshold>10</slow-consumer-threshold>
<slow-consumer-check-period>5</slow-consumer-check-period>
<slow-consumer-policy>NOTIFY</slow-consumer-policy>
<slow-consumer-threshold-measurement-unit>MESSAGES_PER_HOUR</slow-consumer-threshold-measurement-unit>
<auto-create-jms-queues>true</auto-create-jms-queues>
<auto-delete-jms-queues>true</auto-delete-jms-queues>
<auto-create-jms-topics>true</auto-create-jms-topics>
<auto-delete-jms-topics>true</auto-delete-jms-topics>
<auto-create-queues>true</auto-create-queues>
<auto-delete-queues>true</auto-delete-queues>
<auto-create-addresses>true</auto-create-addresses>
<auto-delete-addresses>true</auto-delete-addresses>
<default-purge-on-no-consumers>false</default-purge-on-no-consumers>
<default-max-consumers>5</default-max-consumers>
<default-queue-routing-type>ANYCAST</default-queue-routing-type>
<default-address-routing-type>MULTICAST</default-address-routing-type>
<default-ring-size>3</default-ring-size>
<enable-ingress-timestamp>true</enable-ingress-timestamp>
</address-setting>
<address-setting match="a2">
<dead-letter-address>a2.1</dead-letter-address>
<auto-create-dead-letter-resources>true</auto-create-dead-letter-resources>
<dead-letter-queue-prefix></dead-letter-queue-prefix>
<dead-letter-queue-suffix>.DLQ</dead-letter-queue-suffix>
<expiry-address>a2.2</expiry-address>
<auto-create-expiry-resources>true</auto-create-expiry-resources>
<expiry-queue-prefix></expiry-queue-prefix>
<expiry-queue-suffix>.EXP</expiry-queue-suffix>
<redelivery-delay>5</redelivery-delay>
<max-size-bytes>932489234928324</max-size-bytes>
<page-size-bytes>712671626</page-size-bytes>
<page-max-cache-size>20</page-max-cache-size>
<message-counter-history-day-limit>8</message-counter-history-day-limit>
<slow-consumer-threshold>20</slow-consumer-threshold>
<slow-consumer-check-period>15</slow-consumer-check-period>
<slow-consumer-policy>KILL</slow-consumer-policy>
<slow-consumer-threshold-measurement-unit>MESSAGES_PER_DAY</slow-consumer-threshold-measurement-unit>
<auto-create-jms-queues>false</auto-create-jms-queues>
<auto-delete-jms-queues>false</auto-delete-jms-queues>
<auto-create-jms-topics>false</auto-create-jms-topics>
<auto-delete-jms-topics>false</auto-delete-jms-topics>
<auto-create-queues>false</auto-create-queues>
<auto-delete-queues>false</auto-delete-queues>
<auto-delete-queues-delay>500</auto-delete-queues-delay>
<auto-create-addresses>false</auto-create-addresses>
<auto-delete-addresses>false</auto-delete-addresses>
<auto-delete-addresses-delay>1000</auto-delete-addresses-delay>
<default-purge-on-no-consumers>true</default-purge-on-no-consumers>
<default-max-consumers>15</default-max-consumers>
<default-queue-routing-type>MULTICAST</default-queue-routing-type>
<default-address-routing-type>ANYCAST</default-address-routing-type>
<default-consumer-window-size>10000</default-consumer-window-size>
<retroactive-message-count>10</retroactive-message-count>
<enable-metrics>false</enable-metrics>
</address-setting>
</address-settings>

View File

@ -0,0 +1,50 @@
<!--
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.
-->
<addresses xmlns="urn:activemq:core">
<address name="addr1">
<anycast>
<queue name="q1" ring-size="3">
<durable>${falseProp}</durable>
<filter string="color='blue'"/>
</queue>
<queue name="q2" max-consumers="-1" purge-on-no-consumers="${falseProp}" group-rebalance-pause-dispatch="true">
<durable>${trueProp}</durable>
<filter string="color='green'"/>
</queue>
</anycast>
</address>
<address name="addr2">
<multicast>
<queue name="q3" max-consumers="10" >
<filter string="color='red'"/>
</queue>
<queue name="q4" purge-on-no-consumers="${trueProp}" group-rebalance-pause-dispatch="true">
<durable>${trueProp}</durable>
</queue>
</multicast>
</address>
<address name="addr2">
<multicast>
<queue name="q5" max-consumers="1" />
<queue name="q6" max-consumers="1" />
</multicast>
<anycast>
<queue name="q7" max-consumers="-1" />
<queue name="q8" max-consumers="-1" />
</anycast>
</address>
</addresses>

View File

@ -0,0 +1,65 @@
<!--
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.
-->
<bridges xmlns="urn:activemq:core">
<bridge name="bridge1">
<queue-name>queue1</queue-name>
<forwarding-address>bridge-forwarding-address1</forwarding-address>
<filter string="sku > 1"/>
<transformer-class-name>org.foo.BridgeTransformer</transformer-class-name>
<min-large-message-size>4M</min-large-message-size>
<check-period>31</check-period>
<connection-ttl>370</connection-ttl>
<retry-interval>3</retry-interval>
<retry-interval-multiplier>0.2</retry-interval-multiplier>
<max-retry-interval>10002</max-retry-interval>
<reconnect-attempts>2</reconnect-attempts>
<failover-on-server-shutdown>false</failover-on-server-shutdown>
<use-duplicate-detection>true</use-duplicate-detection>
<confirmation-window-size>1G</confirmation-window-size>
<producer-window-size>444</producer-window-size>
<routing-type>STRIP</routing-type>
<static-connectors>
<connector-ref>connector1</connector-ref>
</static-connectors>
</bridge>
<bridge name="bridge2">
<queue-name>queue2</queue-name>
<forwarding-address>bridge-forwarding-address2</forwarding-address>
<producer-window-size>555k</producer-window-size>
<discovery-group-ref discovery-group-name="dg1"/>
</bridge>
<bridge name="bridge3">
<queue-name>queue3</queue-name>
<forwarding-address>bridge-forwarding-address2</forwarding-address>
<transformer>
<class-name>org.foo.BridgeTransformer3</class-name>
<property key="bridgeTransformerKey1" value="bridgeTransformerValue1"/>
<property key="bridgeTransformerKey2" value="bridgeTransformerValue2"/>
</transformer>
<producer-window-size>555k</producer-window-size>
<discovery-group-ref discovery-group-name="dg1"/>
</bridge>
<bridge name="bridge4">
<queue-name>queue3</queue-name>
<forwarding-address>bridge-forwarding-address2</forwarding-address>
<confirmation-window-size>-1</confirmation-window-size>
<producer-window-size>-1</producer-window-size>
<static-connectors>
<connector-ref>connector1</connector-ref>
</static-connectors>
</bridge>
</bridges>

View File

@ -0,0 +1,32 @@
<!--
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.
-->
<broadcast-groups xmlns="urn:activemq:core">
<broadcast-group name="bg1">
<local-bind-port>10999</local-bind-port>
<group-address>192.168.0.120</group-address>
<group-port>11999</group-port>
<broadcast-period>12345</broadcast-period>
<connector-ref>connector1</connector-ref>
</broadcast-group>
<broadcast-group name="bg2">
<local-bind-port>12999</local-bind-port>
<group-address>192.168.0.121</group-address>
<group-port>13999</group-port>
<broadcast-period>23456</broadcast-period>
<connector-ref>connector2</connector-ref>
</broadcast-group>
</broadcast-groups>

View File

@ -0,0 +1,31 @@
<!--
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.
-->
<broker-connections xmlns="urn:activemq:core">
<amqp-connection uri="tcp://test1:111" name="test1" retry-interval="333" reconnect-attempts="33" user="-5da23e449f1b4b24dd05b6572705eea3" password="-4c07e66dc377c18d95220e791dd51e82">
<sender address-match="TEST-SENDER" />
<receiver address-match="TEST-RECEIVER" />
<peer address-match="TEST-PEER"/>
<receiver queue-name="TEST-WITH-QUEUE-NAME"/>
<mirror message-acknowledgements="false" queue-creation="false" durable="false" queue-removal="false"/>
</amqp-connection>
<amqp-connection uri="tcp://test2:222" name="test2">
<mirror durable="false"/>
</amqp-connection>
<amqp-connection uri="tcp://false" name="auto-start-false" auto-start="false">
<mirror/>
</amqp-connection>
</broker-connections>

View File

@ -0,0 +1,24 @@
<!--
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.
-->
<broker-plugins xmlns="urn:activemq:core">
<broker-plugin class-name="org.apache.activemq.artemis.core.config.impl.FileConfigurationTest$EmptyPlugin1">
<property key="key1" value="value1"/>
<property key="key2" value="value2"/>
<property key="key3" value="value3"/>
</broker-plugin>
<broker-plugin class-name="org.apache.activemq.artemis.core.config.impl.FileConfigurationTest$EmptyPlugin2" />
</broker-plugins>

View File

@ -0,0 +1,55 @@
<!--
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.
-->
<cluster-connections xmlns="urn:activemq:core">
<cluster-connection name="cluster-connection1">
<address>queues1</address>
<connector-ref>connector1</connector-ref>
<check-period>331</check-period>
<connection-ttl>3370</connection-ttl>
<min-large-message-size>321</min-large-message-size>
<call-timeout>123</call-timeout>
<retry-interval>3</retry-interval>
<retry-interval-multiplier>0.25</retry-interval-multiplier>
<max-retry-interval>10000</max-retry-interval>
<reconnect-attempts>72</reconnect-attempts>
<use-duplicate-detection>true</use-duplicate-detection>
<message-load-balancing>ON_DEMAND</message-load-balancing>
<max-hops>1</max-hops>
<producer-window-size>222</producer-window-size>
<call-failover-timeout>123</call-failover-timeout>
<static-connectors>
<connector-ref>connector1</connector-ref>
<connector-ref>connector2</connector-ref>
</static-connectors>
</cluster-connection>
<cluster-connection name="cluster-connection2">
<address>queues2</address>
<connector-ref>connector2</connector-ref>
<call-timeout>456</call-timeout>
<retry-interval>4</retry-interval>
<use-duplicate-detection>false</use-duplicate-detection>
<message-load-balancing>STRICT</message-load-balancing>
<max-hops>2</max-hops>
<producer-window-size>333</producer-window-size>
<call-failover-timeout>456</call-failover-timeout>
<discovery-group-ref discovery-group-name="dg1"/>
</cluster-connection>
<cluster-connection name="cluster-connection3">
<connector-ref>connector2</connector-ref>
<message-load-balancing>OFF_WITH_REDISTRIBUTION</message-load-balancing>
</cluster-connection>
</cluster-connections>

View File

@ -0,0 +1,64 @@
<!--
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.
-->
<connection-routers xmlns="urn:activemq:core">
<connection-router name="simple-local">
<key-type>CLIENT_ID</key-type>
<key-filter>^[^.]+</key-filter>
<local-target-filter>DEFAULT</local-target-filter>
</connection-router>
<connection-router name="simple-local-with-transformer">
<key-type>CLIENT_ID</key-type>
<key-filter>^[^.]+</key-filter>
<local-target-filter>DEFAULT</local-target-filter>
<policy name="CONSISTENT_HASH_MODULO">
<property key="MODULO" value="2"></property>
</policy>
</connection-router>
<connection-router name="simple-router">
<key-type>USER_NAME</key-type>
<policy name="FIRST_ELEMENT"/>
<pool>
<static-connectors>
<connector-ref>connector1</connector-ref>
</static-connectors>
</pool>
</connection-router>
<connection-router name="consistent-hash-router">
<key-type>SNI_HOST</key-type>
<key-filter>^[^.]+</key-filter>
<local-target-filter>DEFAULT</local-target-filter>
<policy name="CONSISTENT_HASH"/>
<pool>
<check-period>1000</check-period>
<local-target-enabled>true</local-target-enabled>
<discovery-group-ref discovery-group-name="dg1"/>
</pool>
</connection-router>
<connection-router name="least-connections-router">
<cache>
<persisted>true</persisted>
<timeout>60000</timeout>
</cache>
<policy name="LEAST_CONNECTIONS"/>
<pool>
<check-period>3000</check-period>
<quorum-size>2</quorum-size>
<quorum-timeout>1000</quorum-timeout>
<discovery-group-ref discovery-group-name="dg2"/>
</pool>
</connection-router>
</connection-routers>

View File

@ -0,0 +1,21 @@
<!--
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.
-->
<connector-services xmlns="urn:activemq:core">
<connector-service>
<factory-class>org.foo</factory-class>
</connector-service>
</connector-services>

View File

@ -0,0 +1,20 @@
<!--
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.
-->
<connectors xmlns="urn:activemq:core">
<connector name="connector1">tcp://localhost1:5678?localAddress=mylocal;localPort=99</connector>
<connector name="connector2">vm://5</connector>
</connectors>

View File

@ -0,0 +1,30 @@
<!--
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.
-->
<discovery-groups xmlns="urn:activemq:core">
<discovery-group name="dg1">
<local-bind-address>172.16.8.10</local-bind-address>
<group-address>192.168.0.120</group-address>
<group-port>11999</group-port>
<refresh-timeout>12345</refresh-timeout>
</discovery-group>
<discovery-group name="dg2">
<local-bind-address>172.16.8.11</local-bind-address>
<group-address>192.168.0.121</group-address>
<group-port>12999</group-port>
<refresh-timeout>23456</refresh-timeout>
</discovery-group>
</discovery-groups>

View File

@ -0,0 +1,46 @@
<!--
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.
-->
<diverts xmlns="urn:activemq:core">
<divert name="divert1">
<routing-name>routing-name1</routing-name>
<address>address1</address>
<forwarding-address>forwarding-address1</forwarding-address>
<filter string="speed > 88"/>
<transformer-class-name>org.foo.Transformer</transformer-class-name>
<exclusive>true</exclusive>
</divert>
<divert name="divert2">
<routing-name>routing-name2</routing-name>
<address>address2</address>
<forwarding-address>forwarding-address2</forwarding-address>
<filter string="speed &lt; 88"/>
<transformer-class-name>org.foo.Transformer2</transformer-class-name>
<exclusive>false</exclusive>
</divert>
<divert name="divert3">
<routing-name>routing-name2</routing-name>
<address>address2</address>
<forwarding-address>forwarding-address2</forwarding-address>
<filter string="speed &lt; 88"/>
<transformer>
<class-name>org.foo.DivertTransformer3</class-name>
<property key="divertTransformerKey1" value="divertTransformerValue1"/>
<property key="divertTransformerKey2" value="divertTransformerValue2"/>
</transformer>
<exclusive>false</exclusive>
</divert>
</diverts>

View File

@ -0,0 +1,123 @@
<!--
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.
-->
<federations xmlns="urn:activemq:core">
<federation name="federation1">
<upstream name="eu-west-1" user="westuser" password="32a10275cf4ab4e9">
<static-connectors>
<connector-ref>connector1</connector-ref>
</static-connectors>
<policy ref="policySetA"/>
</upstream>
<upstream name="eu-east-1" user="eastuser" password="32a10275cf4ab4e9">
<ha>true</ha>
<discovery-group-ref discovery-group-name="dg1"/>
<policy ref="policySetA"/>
</upstream>
<policy-set name="policySetA">
<policy ref="address-federation" />
<policy ref="queue-federation" />
</policy-set>
<queue-policy name="queue-federation" >
<exclude queue-match="the_queue" address-match="#" />
</queue-policy>
<address-policy name="address-federation" >
<include address-match="the_address" />
</address-policy>
</federation>
<federation name="federation2" user="globaluser" password="32a10275cf4ab4e9">
<upstream name="usa-west-1">
<static-connectors>
<connector-ref>connector1</connector-ref>
</static-connectors>
<policy ref="address-federation-usa"/>
</upstream>
<upstream name="usa-east-1" >
<ha>true</ha>
<discovery-group-ref discovery-group-name="dg1"/>
<policy ref="queue-federation-usa"/>
</upstream>
<queue-policy name="queue-federation-usa" >
<exclude queue-match="the_queue" address-match="#" />
</queue-policy>
<address-policy name="address-federation-usa" >
<include address-match="the_address" />
</address-policy>
</federation>
<federation name="federation3" user="globaluser" password="32a10275cf4ab4e9">
<upstream name="asia-1">
<static-connectors>
<connector-ref>connector1</connector-ref>
</static-connectors>
<policy ref="queue-federation-asia"/>
<policy ref="address-federation-asia"/>
</upstream>
<upstream name="asia-2" >
<ha>true</ha>
<discovery-group-ref discovery-group-name="dg1"/>
<policy ref="queue-federation-asia"/>
<policy ref="address-federation-asia"/>
</upstream>
<queue-policy name="queue-federation-asia" transformer-ref="federation-transformer-3" >
<exclude queue-match="the_queue" address-match="#" />
</queue-policy>
<address-policy name="address-federation-asia" transformer-ref="federation-transformer-3" >
<include address-match="the_address" />
</address-policy>
<transformer name="federation-transformer-3">
<class-name>org.foo.FederationTransformer3</class-name>
<property key="federationTransformerKey1" value="federationTransformerValue1"/>
<property key="federationTransformerKey2" value="federationTransformerValue2"/>
</transformer>
</federation>
<federation name="federation4" user="globaluser" password="32a10275cf4ab4e9">
<upstream name="asia-3">
<static-connectors>
<connector-ref>connector1</connector-ref>
</static-connectors>
<policy ref="queue-federation-asia"/>
<policy ref="address-federation-asia"/>
</upstream>
<downstream name="asia-4" >
<ha>true</ha>
<discovery-group-ref discovery-group-name="dg1"/>
<policy ref="queue-federation-asia"/>
<policy ref="address-federation-asia"/>
<upstream-connector-ref>connector1</upstream-connector-ref>
</downstream>
<queue-policy name="queue-federation-asia2" transformer-ref="federation-transformer-4" >
<exclude queue-match="the_queue" address-match="#" />
</queue-policy>
<address-policy name="address-federation-asia2" transformer-ref="federation-transformer-4" >
<include address-match="the_address" />
</address-policy>
<transformer name="federation-transformer-4">
<class-name>org.foo.FederationTransformer4</class-name>
<property key="federationTransformerKey1" value="federationTransformerValue1"/>
<property key="federationTransformerKey2" value="federationTransformerValue2"/>
</transformer>
</federation>
</federations>

View File

@ -0,0 +1,20 @@
<!--
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.
-->
<grouping-handler xmlns="urn:activemq:core" name="gh1">
<type>LOCAL</type>
<address>jms</address>
</grouping-handler>

View File

@ -0,0 +1,29 @@
<!--
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.
-->
<ha-policy xmlns="urn:activemq:core">
<!--only one of the following-->
<!--on server shutdown scale down to another live server-->
<live-only>
<scale-down>
<!--a grouping of servers that can be scaled down to-->
<group-name>boo!</group-name>
<!--either a discovery group-->
<discovery-group-ref discovery-group-name="dg1"/>
</scale-down>
</live-only>
</ha-policy>

View File

@ -0,0 +1,27 @@
<!--
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.
-->
<metrics xmlns="urn:activemq:core">
<jvm-memory>false</jvm-memory>
<jvm-gc>true</jvm-gc>
<jvm-threads>true</jvm-threads>
<netty-pool>true</netty-pool>
<plugin class-name="org.apache.activemq.artemis.core.server.metrics.plugins.SimpleMetricsPlugin">
<property key="foo" value="x"/>
<property key="bar" value="y"/>
<property key="baz" value="z"/>
</plugin>
</metrics>

View File

@ -0,0 +1,20 @@
<!--
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.
-->
<remoting-incoming-interceptors xmlns="urn:activemq:core">
<class-name>org.apache.activemq.artemis.tests.unit.core.config.impl.TestInterceptor1</class-name>
<class-name>org.apache.activemq.artemis.tests.unit.core.config.impl.TestInterceptor2</class-name>
</remoting-incoming-interceptors>

View File

@ -0,0 +1,20 @@
<!--
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.
-->
<remoting-outgoing-interceptors xmlns="urn:activemq:core">
<class-name>org.apache.activemq.artemis.tests.unit.core.config.impl.TestInterceptor1</class-name>
<class-name>org.apache.activemq.artemis.tests.unit.core.config.impl.TestInterceptor2</class-name>
</remoting-outgoing-interceptors>

View File

@ -0,0 +1,22 @@
<!--
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.
-->
<resource-limit-settings xmlns="urn:activemq:core">
<resource-limit-setting match="myUser">
<max-connections>104</max-connections>
<max-queues>13</max-queues>
</resource-limit-setting>
</resource-limit-settings>

View File

@ -0,0 +1,24 @@
<!--
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.
-->
<security-settings xmlns="urn:activemq:core">
<security-setting match="a1">
<permission type="createNonDurableQueue" roles="a1.1"/>
</security-setting>
<security-setting match="${a2Prop}">
<permission type="deleteNonDurableQueue" roles="a2.1"/>
</security-setting>
</security-settings>

View File

@ -0,0 +1,28 @@
<!--
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.
-->
<store xmlns="urn:activemq:core">
<database-store>
<jdbc-connection-url>jdbc:derby:target/derby/database-store;create=true</jdbc-connection-url>
<jdbc-user>5493dd76567ee5ec269d11823973462f</jdbc-user>
<jdbc-password>56a0db3b71043054269d11823973462f</jdbc-password>
<bindings-table-name>BINDINGS_TABLE</bindings-table-name>
<message-table-name>MESSAGE_TABLE</message-table-name>
<large-message-table-name>LARGE_MESSAGE_TABLE</large-message-table-name>
<page-store-table-name>PAGE_STORE_TABLE</page-store-table-name>
<jdbc-driver-class-name>org.apache.derby.jdbc.EmbeddedDriver</jdbc-driver-class-name>
</database-store>
</store>

View File

@ -0,0 +1,163 @@
<!--
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.
-->
<configuration
xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:schemaLocation="urn:activemq ../../../../artemis-server/src/main/resources/schema/artemis-server.xsd">
<core xmlns="urn:activemq:core">
<name>SomeNameForUseOnTheApplicationServer</name>
<resolve-protocols>false</resolve-protocols>
<persistence-enabled>false</persistence-enabled>
<scheduled-thread-pool-max-size>12345</scheduled-thread-pool-max-size>
<thread-pool-max-size>54321</thread-pool-max-size>
<security-enabled>false</security-enabled>
<graceful-shutdown-enabled>true</graceful-shutdown-enabled>
<graceful-shutdown-timeout>12345</graceful-shutdown-timeout>
<security-invalidation-interval>5423</security-invalidation-interval>
<authentication-cache-size>333</authentication-cache-size>
<authorization-cache-size>444</authorization-cache-size>
<journal-lock-acquisition-timeout>7654</journal-lock-acquisition-timeout>
<wild-card-routing-enabled>true</wild-card-routing-enabled>
<management-address>Giraffe</management-address>
<management-notification-address>Whatever</management-notification-address>
<cluster-user>Frog</cluster-user>
<cluster-password>32a10275cf4ab4e9</cluster-password>
<password-codec>org.apache.activemq.artemis.utils.DefaultSensitiveStringCodec</password-codec>
<mask-password>true</mask-password>
<log-delegate-factory-class-name>com.foo</log-delegate-factory-class-name>
<jmx-management-enabled>false</jmx-management-enabled>
<jmx-domain>gro.qtenroh</jmx-domain>
<message-counter-enabled>true</message-counter-enabled>
<message-counter-sample-period>123456</message-counter-sample-period>
<message-counter-max-day-history>5</message-counter-max-day-history>
<connection-ttl-override>12345</connection-ttl-override>
<async-connection-execution-enabled>false</async-connection-execution-enabled>
<transaction-timeout>98765</transaction-timeout>
<transaction-timeout-scan-period>56789</transaction-timeout-scan-period>
<message-expiry-scan-period>10111213</message-expiry-scan-period>
<message-expiry-thread-priority>8</message-expiry-thread-priority>
<address-queue-scan-period>25000</address-queue-scan-period>
<id-cache-size>127</id-cache-size>
<journal-datasync>false</journal-datasync>
<persist-id-cache>true</persist-id-cache>
<populate-validated-user>true</populate-validated-user>
<reject-empty-validated-user>false</reject-empty-validated-user>
<mqtt-session-scan-interval>123456</mqtt-session-scan-interval>
<connection-ttl-check-interval>98765</connection-ttl-check-interval>
<configuration-file-refresh-period>1234567</configuration-file-refresh-period>
<temporary-queue-namespace>TEMP</temporary-queue-namespace>
<global-max-size>1234567</global-max-size>
<max-disk-usage>37</max-disk-usage>
<disk-scan-period>123</disk-scan-period>
<critical-analyzer-policy>HALT</critical-analyzer-policy>
<critical-analyzer-check-period>333</critical-analyzer-check-period>
<critical-analyzer-timeout>777</critical-analyzer-timeout>
<critical-analyzer>false</critical-analyzer>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-remoting-incoming-interceptors.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-remoting-outgoing-interceptors.xml"/>
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-connectors.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-acceptors.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-broadcast-groups.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-discovery-groups.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-diverts.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-connection-routers.xml"/>
<amqp-use-core-subscription-naming>true</amqp-use-core-subscription-naming>
<!-- queues element is deprecated, modular include not supported -->
<queues>
<queue name="queue1">
<address>address1</address>
<filter string="color='red'"/>
<durable>false</durable>
</queue>
<queue name="queue2">
<address>address2</address>
<filter string="color='blue'"/>
<durable>false</durable>
</queue>
</queues>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-bridges.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-metrics.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-ha-policy.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-cluster-connections.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-broker-connections.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-grouping-handler.xml"/>
<paging-directory>pagingdir</paging-directory>
<bindings-directory>somedir</bindings-directory>
<create-bindings-dir>false</create-bindings-dir>
<page-max-concurrent-io>17</page-max-concurrent-io>
<read-whole-page>true</read-whole-page>
<journal-directory>somedir2</journal-directory>
<journal-retention-directory unit="DAYS" period="365" storage-limit="10G">history</journal-retention-directory>
<create-journal-dir>false</create-journal-dir>
<journal-type>NIO</journal-type>
<journal-buffer-timeout>1000</journal-buffer-timeout>
<journal-buffer-size>10000</journal-buffer-size>
<journal-sync-transactional>false</journal-sync-transactional>
<journal-sync-non-transactional>true</journal-sync-non-transactional>
<log-journal-write-rate>true</log-journal-write-rate>
<journal-file-size>12345678</journal-file-size>
<journal-min-files>100</journal-min-files>
<journal-compact-percentage>33</journal-compact-percentage>
<journal-compact-min-files>123</journal-compact-min-files>
<journal-max-io>56546</journal-max-io>
<journal-file-open-timeout>9876</journal-file-open-timeout>
<journal-device-block-size>777</journal-device-block-size>
<server-dump-interval>5000</server-dump-interval>
<memory-warning-threshold>95</memory-warning-threshold>
<memory-measure-interval>54321</memory-measure-interval>
<large-messages-directory>largemessagesdir</large-messages-directory>
<network-check-list>127.0.0.1</network-check-list>
<network-check-NIC>some-nick</network-check-NIC>
<network-check-period>123</network-check-period>
<network-check-timeout>321</network-check-timeout>
<network-check-URL-list>www.apache.org</network-check-URL-list>
<network-check-ping-command>ping-four</network-check-ping-command>
<network-check-ping6-command>ping-six</network-check-ping6-command>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-security-settings.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-address-settings.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-resource-limit-settings.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-connector-services.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-addresses.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-broker-plugins.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-store.xml"/>
<xi:include href="${xincludePath}/ConfigurationTest-xinclude-schema-config-federations.xml"/>
</core>
</configuration>