This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 96976de192 ARTEMIS-5382 Fix topology-scanner-attempts parsing
96976de192 is described below
commit 96976de192788ea9603cc79e6c13772a81f01780
Author: Domenico Francesco Bruscino <[email protected]>
AuthorDate: Thu Apr 17 07:48:02 2025 +0200
ARTEMIS-5382 Fix topology-scanner-attempts parsing
---
.../artemis/core/deployers/impl/FileConfigurationParser.java | 2 +-
artemis-server/src/main/resources/schema/artemis-configuration.xsd | 2 +-
.../activemq/artemis/core/config/impl/FileConfigurationTest.java | 2 +-
.../src/test/resources/ConfigurationTest-full-config.xml | 2 +-
.../src/test/resources/ConfigurationTest-xinclude-config.xml | 2 +-
...onfigurationTest-xinclude-schema-config-cluster-connections.xml | 2 +-
docs/user-manual/clusters.adoc | 7 +++++++
.../integration/cluster/distribution/SymmetricClusterTest.java | 4 ----
8 files changed, 13 insertions(+), 10 deletions(-)
diff --git
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
index 7d6839fffe..064e97a6be 100644
---
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
+++
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
@@ -2360,7 +2360,7 @@ public final class FileConfigurationParser extends
XMLConfigurationUtil {
int clusterNotificationAttempts = getInteger(e, "notification-attempts",
ActiveMQDefaultConfiguration.getDefaultClusterNotificationAttempts(), GT_ZERO);
- int topologyScannerAttempts = getInteger(e, "topology-scanner-attempts",
ActiveMQDefaultConfiguration.getClusterTopologyScannerAttempts(),
MINUS_ONE_OR_POSITIVE_INT);
+ int topologyScannerAttempts = getInteger(e, "topology-scanner-attempts",
ActiveMQDefaultConfiguration.getClusterTopologyScannerAttempts(),
MINUS_ONE_OR_GE_ZERO);
String discoveryGroupName = null;
diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd
b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
index 2329f4ad3e..5bfb1df2b6 100644
--- a/artemis-server/src/main/resources/schema/artemis-configuration.xsd
+++ b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
@@ -2630,7 +2630,7 @@
</xsd:annotation>
</xsd:element>
- <xsd:element name="topology-scanner-attempts" type="xsd:int"
default="-1" maxOccurs="1" minOccurs="0">
+ <xsd:element name="topology-scanner-attempts" type="xsd:int"
default="30" maxOccurs="1" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
maximum number of topology scanner attempts, -1 means 'no
limits'
diff --git
a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
index 799a364112..1d1ccdc68e 100644
---
a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
+++
b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
@@ -499,7 +499,7 @@ public class FileConfigurationTest extends
AbstractConfigurationTestBase {
assertEquals("dg1", ccc.getDiscoveryGroupName());
assertEquals(333, ccc.getProducerWindowSize());
assertFalse(ccc.isAllowDirectConnectionsOnly());
- assertEquals(30, ccc.getTopologyScannerAttempts());
+ assertEquals(0, ccc.getTopologyScannerAttempts());
}
}
diff --git
a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
index be6d3684af..e296333b03 100644
--- a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
+++ b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
@@ -453,7 +453,7 @@
<message-load-balancing>STRICT</message-load-balancing>
<max-hops>2</max-hops>
<producer-window-size>333</producer-window-size>
- <topology-scanner-attempts>30</topology-scanner-attempts>
+ <topology-scanner-attempts>0</topology-scanner-attempts>
</cluster-connection>
<cluster-connection name="cluster-connection3">
<connector-ref>connector2</connector-ref>
diff --git
a/artemis-server/src/test/resources/ConfigurationTest-xinclude-config.xml
b/artemis-server/src/test/resources/ConfigurationTest-xinclude-config.xml
index fd426361a2..081658a706 100644
--- a/artemis-server/src/test/resources/ConfigurationTest-xinclude-config.xml
+++ b/artemis-server/src/test/resources/ConfigurationTest-xinclude-config.xml
@@ -341,7 +341,7 @@
<producer-window-size>333</producer-window-size>
<call-failover-timeout>456</call-failover-timeout>
<discovery-group-ref discovery-group-name="dg1"/>
- <topology-scanner-attempts>30</topology-scanner-attempts>
+ <topology-scanner-attempts>0</topology-scanner-attempts>
</cluster-connection>
<cluster-connection name="cluster-connection3">
<connector-ref>connector2</connector-ref>
diff --git
a/artemis-server/src/test/resources/ConfigurationTest-xinclude-schema-config-cluster-connections.xml
b/artemis-server/src/test/resources/ConfigurationTest-xinclude-schema-config-cluster-connections.xml
index 59912341d6..aaefcf49f6 100644
---
a/artemis-server/src/test/resources/ConfigurationTest-xinclude-schema-config-cluster-connections.xml
+++
b/artemis-server/src/test/resources/ConfigurationTest-xinclude-schema-config-cluster-connections.xml
@@ -48,7 +48,7 @@
<producer-window-size>333</producer-window-size>
<call-failover-timeout>456</call-failover-timeout>
<discovery-group-ref discovery-group-name="dg1"/>
- <topology-scanner-attempts>30</topology-scanner-attempts>
+ <topology-scanner-attempts>0</topology-scanner-attempts>
</cluster-connection>
<cluster-connection name="cluster-connection3">
<connector-ref>connector2</connector-ref>
diff --git a/docs/user-manual/clusters.adoc b/docs/user-manual/clusters.adoc
index 3b9b335fd9..6ed9cdec92 100644
--- a/docs/user-manual/clusters.adoc
+++ b/docs/user-manual/clusters.adoc
@@ -588,6 +588,13 @@ An optional identifier to use for the cluster connection.
This can help with identifying the connection on the remote broker (e.g. via
the web console).
Default is empty (i.e. unset).
+topology-scanner-attempts::
+The number of times the system tries to scan the cluster connection topology
for missing cluster nodes. Those are nodes
+discovered by a discovery group or defined by a static connector that are not
present in the cluster connection topology.
+A value of `0` means the system doesn't scan the cluster connection topology
for missing cluster nodes.
+A value of `-1` means the system scans the cluster connection topology until
there are no more missing cluster nodes.
+Default is 30.
+
=== Cluster User Credentials
When creating connections between nodes of a cluster to form a cluster
connection, Apache ActiveMQ Artemis uses a cluster user and cluster password
which is defined in `broker.xml`:
diff --git
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
index 6226b2f9df..ce71b7e44c 100644
---
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
+++
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterTest.java
@@ -1441,10 +1441,6 @@ public class SymmetricClusterTest extends
ClusterTestBase {
if (withPartition) {
setupProxy();
enablePartition();
-
- for (int node = 0; node < 5; node++) {
-
getServer(node).getConfiguration().getClusterConfigurations().get(0).setTopologyScannerAttempts(-1);
- }
}
startServers();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact