ARTEMIS-3108 bridge XML config doesn't allow -1

The value `-1` is valid for both the confirmation-window-size and the
producer-window-size elements.
This commit is contained in:
Justin Bertram 2021-02-08 11:16:04 -06:00 committed by Clebert Suconic
parent c81ba279e1
commit 52de3827fe
2 changed files with 11 additions and 2 deletions

View File

@ -2057,9 +2057,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
String transformerClassName = getString(brNode, "transformer-class-name", null, Validators.NO_CHECK);
// Default bridge conf
int confirmationWindowSize = getTextBytesAsIntBytes(brNode, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.POSITIVE_INT);
int confirmationWindowSize = getTextBytesAsIntBytes(brNode, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.MINUS_ONE_OR_GE_ZERO);
int producerWindowSize = getTextBytesAsIntBytes(brNode, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), Validators.POSITIVE_INT);
int producerWindowSize = getTextBytesAsIntBytes(brNode, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), Validators.MINUS_ONE_OR_GE_ZERO);
long retryInterval = getLong(brNode, "retry-interval", ActiveMQClient.DEFAULT_RETRY_INTERVAL, Validators.GT_ZERO);

View File

@ -204,6 +204,15 @@
<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>
<federations>
<federation name="federation1">