diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java index d8da748ac9..85b8691110 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java @@ -337,7 +337,7 @@ public final class ActiveMQDefaultConfiguration { private static int DEFAULT_BRIDGE_CONFIRMATION_WINDOW_SIZE = 1024 * 1024 * 10; // Producer flow control - private static int DEFAULT_BRIDGE_PRODUCER_WINDOW_SIZE = -1; + private static int DEFAULT_BRIDGE_PRODUCER_WINDOW_SIZE = 1024 * 1024; // Upon reconnection this configures the number of time the same node on the topology will be retried before resetting the server locator and using the initial connectors private static int DEFAULT_BRIDGE_CONNECT_SAME_NODE = 10; diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/BridgeConfigurationTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/BridgeConfigurationTest.java index 65f9b9930d..af84a501ca 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/BridgeConfigurationTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/BridgeConfigurationTest.java @@ -16,6 +16,7 @@ */ package org.apache.activemq.artemis.core.config; +import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.artemis.core.server.ComponentConfigurationRoutingType; import org.apache.activemq.artemis.utils.JsonLoader; import org.junit.Assert; @@ -98,7 +99,8 @@ public class BridgeConfigurationTest { Assert.assertEquals("10", jsonObject.get(BridgeConfiguration.RECONNECT_ATTEMPTS_ON_SAME_NODE).toString()); Assert.assertEquals("true", jsonObject.get(BridgeConfiguration.USE_DUPLICATE_DETECTION).toString()); Assert.assertEquals("10485760", jsonObject.get(BridgeConfiguration.CONFIRMATION_WINDOW_SIZE).toString()); - Assert.assertEquals("-1", jsonObject.get(BridgeConfiguration.PRODUCER_WINDOW_SIZE).toString()); + Assert.assertEquals(Integer.toString(ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize()), jsonObject.get(BridgeConfiguration.PRODUCER_WINDOW_SIZE).toString()); + Assert.assertEquals("30000", jsonObject.get(BridgeConfiguration.CLIENT_FAILURE_CHECK_PERIOD).toString()); Assert.assertEquals("2000", jsonObject.get(BridgeConfiguration.MAX_RETRY_INTERVAL).toString()); Assert.assertEquals("102400", jsonObject.get(BridgeConfiguration.MIN_LARGE_MESSAGE_SIZE).toString()); diff --git a/docs/user-manual/en/clusters.md b/docs/user-manual/en/clusters.md index a97b4302fb..6e37d8d22e 100644 --- a/docs/user-manual/en/clusters.md +++ b/docs/user-manual/en/clusters.md @@ -664,8 +664,7 @@ specified. The following shows all the available configuration options client, default is 1048576. A value of -1 means no window. - `producer-window-size`. The size for producer flow control over cluster connection. - it's by default disabled through the cluster connection bridge but you may want - to set a value if you are using really large messages in cluster. A value of -1 means no window. + it's by default is 1MB. - `call-failover-timeout`. Similar to `call-timeout` but used when a call is made during a failover attempt. Default is -1 (no timeout). diff --git a/docs/user-manual/en/core-bridges.md b/docs/user-manual/en/core-bridges.md index 968b310d4f..d1784e4791 100644 --- a/docs/user-manual/en/core-bridges.md +++ b/docs/user-manual/en/core-bridges.md @@ -162,10 +162,9 @@ Let's take a look at all the parameters in turn: > `max-size-bytes` to prevent the flow of messages from ceasing. - `producer-window-size`. This optional parameter determines the producer flow - control through the bridge. You usually leave this off unless you are dealing - with huge large messages. + control through the bridge. - Default=-1 (disabled) + Default = 1048576 (1 Meba Bytes) - `user`. This optional parameter determines the user name to use when creating the bridge connection to the remote server. If it is not specified the