diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilBundle.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilBundle.java
index 91744c3901..c32bc67c8e 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilBundle.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilBundle.java
@@ -45,4 +45,7 @@ public interface ActiveMQUtilBundle {
@Message(id = 209003, value = "Error instantiating codec {0}", format = Message.Format.MESSAGE_FORMAT)
IllegalArgumentException errorCreatingCodec(@Cause Exception e, String codecClassName);
+
+ @Message(id = 209004, value = "Failed to parse long value from {0}", format = Message.Format.MESSAGE_FORMAT)
+ IllegalArgumentException failedToParseLong(String value);
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java
index c22f37ed2e..bee879099e 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java
@@ -17,11 +17,14 @@
package org.apache.activemq.artemis.utils;
import java.nio.ByteBuffer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.UnpooledByteBufAllocator;
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.logs.ActiveMQUtilBundle;
import org.jboss.logging.Logger;
public class ByteUtil {
@@ -29,6 +32,12 @@ public class ByteUtil {
public static final String NON_ASCII_STRING = "@@@@@";
private static final char[] hexArray = "0123456789ABCDEF".toCharArray();
+ private static final String prefix = "^\\s*(\\d+)\\s*";
+ private static final String suffix = "(b)?\\s*$";
+ private static final Pattern ONE = Pattern.compile(prefix + suffix, Pattern.CASE_INSENSITIVE);
+ private static final Pattern KILO = Pattern.compile(prefix + "k" + suffix, Pattern.CASE_INSENSITIVE);
+ private static final Pattern MEGA = Pattern.compile(prefix + "m" + suffix, Pattern.CASE_INSENSITIVE);
+ private static final Pattern GIGA = Pattern.compile(prefix + "g" + suffix, Pattern.CASE_INSENSITIVE);
public static void debugFrame(Logger logger, String message, ByteBuf byteIn) {
if (logger.isTraceEnabled()) {
@@ -163,4 +172,31 @@ public class ByteUtil {
return ret;
}
+ public static long convertTextBytes(final String text) {
+ try {
+ Matcher m = ONE.matcher(text);
+ if (m.matches()) {
+ return Long.valueOf(Long.parseLong(m.group(1)));
+ }
+
+ m = KILO.matcher(text);
+ if (m.matches()) {
+ return Long.valueOf(Long.parseLong(m.group(1)) * 1024);
+ }
+
+ m = MEGA.matcher(text);
+ if (m.matches()) {
+ return Long.valueOf(Long.parseLong(m.group(1)) * 1024 * 1024);
+ }
+
+ m = GIGA.matcher(text);
+ if (m.matches()) {
+ return Long.valueOf(Long.parseLong(m.group(1)) * 1024 * 1024 * 1024);
+ }
+
+ return Long.parseLong(text);
+ } catch (NumberFormatException e) {
+ throw ActiveMQUtilBundle.BUNDLE.failedToParseLong(text);
+ }
+ }
}
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ByteUtilTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ByteUtilTest.java
index feebae1bc9..de1859885c 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ByteUtilTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ByteUtilTest.java
@@ -19,6 +19,10 @@ package org.apache.activemq.artemis.utils;
import org.junit.Assert;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
public class ByteUtilTest {
@Test
@@ -32,8 +36,8 @@ public class ByteUtilTest {
@Test
public void testNonASCII() {
- Assert.assertEquals("aA", ByteUtil.toSimpleString(new byte[]{97, 0, 65, 0}));
- Assert.assertEquals(ByteUtil.NON_ASCII_STRING, ByteUtil.toSimpleString(new byte[]{0, 97, 0, 65}));
+ assertEquals("aA", ByteUtil.toSimpleString(new byte[]{97, 0, 65, 0}));
+ assertEquals(ByteUtil.NON_ASCII_STRING, ByteUtil.toSimpleString(new byte[]{0, 97, 0, 65}));
System.out.println(ByteUtil.toSimpleString(new byte[]{0, 97, 0, 65}));
}
@@ -50,4 +54,35 @@ public class ByteUtilTest {
}
}
+ @Test
+ public void testTextBytesToLongBytes() {
+ long[] factor = new long[] {1, 5, 10};
+ String[] type = new String[]{"", "b", "k", "m", "g"};
+ long[] size = new long[]{1, 1, 1024, 1024 * 1024, 1024 * 1024 * 1024};
+
+ for (int i = 0; i < 3; i++) {
+ for (int j = 0; j < type.length; j++) {
+ assertEquals(factor[i] * size[j], ByteUtil.convertTextBytes(factor[i] + type[j]));
+ assertEquals(factor[i] * size[j], ByteUtil.convertTextBytes(factor[i] + " " + type[j]));
+ assertEquals(factor[i] * size[j], ByteUtil.convertTextBytes(factor[i] + type[j].toUpperCase()));
+ assertEquals(factor[i] * size[j], ByteUtil.convertTextBytes(factor[i] + " " + type[j].toUpperCase()));
+ if (j >= 2) {
+ assertEquals(factor[i] * size[j], ByteUtil.convertTextBytes(factor[i] + type[j] + "b"));
+ assertEquals(factor[i] * size[j], ByteUtil.convertTextBytes(factor[i] + " " + type[j] + "b"));
+ assertEquals(factor[i] * size[j], ByteUtil.convertTextBytes(factor[i] + type[j].toUpperCase() + "B"));
+ assertEquals(factor[i] * size[j], ByteUtil.convertTextBytes(factor[i] + " " + type[j].toUpperCase() + "B"));
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testTextBytesToLongBytesNegative() {
+ try {
+ ByteUtil.convertTextBytes("x");
+ fail();
+ } catch (Exception e) {
+ assertTrue(e instanceof IllegalArgumentException);
+ }
+ }
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
index 4a4a9a3683..583acc389e 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
@@ -212,7 +212,7 @@ public interface ActiveMQClientMessageBundle {
IllegalArgumentException mustBeInteger(Node elem, String value);
@Message(id = 119055, value = "Element {0} requires a valid Long value, but ''{1}'' cannot be parsed as a Long", format = Message.Format.MESSAGE_FORMAT)
- IllegalArgumentException mustBeLong(Node elem, String value);
+ IllegalArgumentException mustBeLong(Node element, String value);
@Message(id = 119056, value = "Failed to get decoder")
IllegalArgumentException failedToGetDecoder(@Cause Exception e);
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 2721214130..d58941691b 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
@@ -62,8 +62,8 @@ import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
import org.apache.activemq.artemis.core.security.Role;
import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
import org.apache.activemq.artemis.core.server.DivertConfigurationRoutingType;
-import org.apache.activemq.artemis.core.server.RoutingType;
import org.apache.activemq.artemis.core.server.JournalType;
+import org.apache.activemq.artemis.core.server.RoutingType;
import org.apache.activemq.artemis.core.server.SecuritySettingPlugin;
import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
import org.apache.activemq.artemis.core.server.group.impl.GroupingHandlerConfiguration;
@@ -73,6 +73,7 @@ import org.apache.activemq.artemis.core.settings.impl.ResourceLimitSettings;
import org.apache.activemq.artemis.core.settings.impl.SlowConsumerPolicy;
import org.apache.activemq.artemis.uri.AcceptorTransportConfigurationParser;
import org.apache.activemq.artemis.uri.ConnectorTransportConfigurationParser;
+import org.apache.activemq.artemis.utils.ByteUtil;
import org.apache.activemq.artemis.utils.ClassloadingUtil;
import org.apache.activemq.artemis.utils.DefaultSensitiveStringCodec;
import org.apache.activemq.artemis.utils.PasswordMaskingUtil;
@@ -316,7 +317,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
config.setConfigurationFileRefreshPeriod(getLong(e, "configuration-file-refresh-period", config.getConfigurationFileRefreshPeriod(), Validators.GT_ZERO));
- config.setGlobalMaxSize(getLong(e, GLOBAL_MAX_SIZE, config.getGlobalMaxSize(), Validators.MINUS_ONE_OR_GT_ZERO));
+ config.setGlobalMaxSize(getTextBytesAsLongBytes(e, GLOBAL_MAX_SIZE, config.getGlobalMaxSize(), Validators.MINUS_ONE_OR_GT_ZERO));
config.setMaxDiskUsage(getInteger(e, MAX_DISK_USAGE, config.getMaxDiskUsage(), Validators.PERCENTAGE));
@@ -522,11 +523,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
config.setJournalSyncNonTransactional(getBoolean(e, "journal-sync-non-transactional", config.isJournalSyncNonTransactional()));
- config.setJournalFileSize(getInteger(e, "journal-file-size", config.getJournalFileSize(), Validators.GT_ZERO));
+ config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", config.getJournalFileSize(), Validators.GT_ZERO));
int journalBufferTimeout = getInteger(e, "journal-buffer-timeout", config.getJournalType() == JournalType.ASYNCIO ? ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO : ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO, Validators.GT_ZERO);
- int journalBufferSize = getInteger(e, "journal-buffer-size", config.getJournalType() == JournalType.ASYNCIO ? ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO : ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO, Validators.GT_ZERO);
+ int journalBufferSize = getTextBytesAsIntBytes(e, "journal-buffer-size", config.getJournalType() == JournalType.ASYNCIO ? ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO : ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO, Validators.GT_ZERO);
int journalMaxIO = getInteger(e, "journal-max-io", config.getJournalType() == JournalType.ASYNCIO ? ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio() : ActiveMQDefaultConfiguration.getDefaultJournalMaxIoNio(), Validators.GT_ZERO);
@@ -836,9 +837,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
} else if (MAX_REDELIVERY_DELAY_NODE_NAME.equalsIgnoreCase(name)) {
addressSettings.setMaxRedeliveryDelay(XMLUtil.parseLong(child));
} else if (MAX_SIZE_BYTES_NODE_NAME.equalsIgnoreCase(name)) {
- addressSettings.setMaxSizeBytes(XMLUtil.parseLong(child));
+ addressSettings.setMaxSizeBytes(ByteUtil.convertTextBytes(getTrimmedTextContent(child)));
} else if (PAGE_SIZE_BYTES_NODE_NAME.equalsIgnoreCase(name)) {
- addressSettings.setPageSizeBytes(XMLUtil.parseLong(child));
+ addressSettings.setPageSizeBytes(ByteUtil.convertTextBytes(getTrimmedTextContent(child)));
} else if (PAGE_MAX_CACHE_SIZE_NODE_NAME.equalsIgnoreCase(name)) {
addressSettings.setPageCacheMaxSize(XMLUtil.parseInt(child));
} else if (MESSAGE_COUNTER_HISTORY_DAY_LIMIT_NODE_NAME.equalsIgnoreCase(name)) {
@@ -1428,7 +1429,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
double retryIntervalMultiplier = getDouble(e, "retry-interval-multiplier", ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), Validators.GT_ZERO);
- int minLargeMessageSize = getInteger(e, "min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, Validators.GT_ZERO);
+ int minLargeMessageSize = getTextBytesAsIntBytes(e, "min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, Validators.GT_ZERO);
long maxRetryInterval = getLong(e, "max-retry-interval", ActiveMQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), Validators.GT_ZERO);
@@ -1436,9 +1437,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
int reconnectAttempts = getInteger(e, "reconnect-attempts", ActiveMQDefaultConfiguration.getDefaultClusterReconnectAttempts(), Validators.MINUS_ONE_OR_GE_ZERO);
- int confirmationWindowSize = getInteger(e, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), Validators.GT_ZERO);
+ int confirmationWindowSize = getTextBytesAsIntBytes(e, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), Validators.GT_ZERO);
- int producerWindowSize = getInteger(e, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), Validators.MINUS_ONE_OR_GT_ZERO);
+ int producerWindowSize = getTextBytesAsIntBytes(e, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeProducerWindowSize(), Validators.MINUS_ONE_OR_GT_ZERO);
long clusterNotificationInterval = getLong(e, "notification-interval", ActiveMQDefaultConfiguration.getDefaultClusterNotificationInterval(), Validators.GT_ZERO);
@@ -1499,9 +1500,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
String transformerClassName = getString(brNode, "transformer-class-name", null, Validators.NO_CHECK);
// Default bridge conf
- int confirmationWindowSize = getInteger(brNode, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.GT_ZERO);
+ int confirmationWindowSize = getTextBytesAsIntBytes(brNode, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.GT_ZERO);
- int producerWindowSize = getInteger(brNode, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.GT_ZERO);
+ int producerWindowSize = getTextBytesAsIntBytes(brNode, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.GT_ZERO);
long retryInterval = getLong(brNode, "retry-interval", ActiveMQClient.DEFAULT_RETRY_INTERVAL, Validators.GT_ZERO);
@@ -1509,7 +1510,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
long connectionTTL = getLong(brNode, "connection-ttl", ActiveMQClient.DEFAULT_CONNECTION_TTL, Validators.GT_ZERO);
- int minLargeMessageSize = getInteger(brNode, "min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, Validators.GT_ZERO);
+ int minLargeMessageSize = getTextBytesAsIntBytes(brNode, "min-large-message-size", ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, Validators.GT_ZERO);
long maxRetryInterval = getLong(brNode, "max-retry-interval", ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, Validators.GT_ZERO);
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/utils/XMLConfigurationUtil.java b/artemis-server/src/main/java/org/apache/activemq/artemis/utils/XMLConfigurationUtil.java
index 79dcd1d20c..7ce52800c1 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/utils/XMLConfigurationUtil.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/utils/XMLConfigurationUtil.java
@@ -79,6 +79,21 @@ public class XMLConfigurationUtil {
}
}
+ public static final Long getTextBytesAsLongBytes(final Element e,
+ final String name,
+ final long def,
+ final Validators.Validator validator) {
+ NodeList nl = e.getElementsByTagName(name);
+ if (nl.getLength() > 0) {
+ long val = ByteUtil.convertTextBytes(nl.item(0).getTextContent().trim());
+ validator.validate(name, val);
+ return val;
+ } else {
+ validator.validate(name, def);
+ return def;
+ }
+ }
+
public static final Integer getInteger(final Element e,
final String name,
final int def,
@@ -94,6 +109,13 @@ public class XMLConfigurationUtil {
}
}
+ public static final Integer getTextBytesAsIntBytes(final Element e,
+ final String name,
+ final int def,
+ final Validators.Validator validator) {
+ return getTextBytesAsLongBytes(e, name, def, validator).intValue();
+ }
+
public static final Boolean getBoolean(final Element e, final String name, final boolean def) {
NodeList nl = e.getElementsByTagName(name);
if (nl.getLength() > 0) {
diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
index c23a2ea9d6..66739fed70 100644
--- a/artemis-server/src/main/resources/schema/artemis-configuration.xsd
+++ b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
@@ -597,10 +597,11 @@
-
+
- The size of the internal buffer on the journal in KiB.
+ The size (in bytes) of the internal buffer on the journal. Supports byte notation like "K", "Mb",
+ "GB", etc.
@@ -631,10 +632,10 @@
-
+
- the size (in bytes) of each journal file
+ The size (in bytes) of each journal file. Supports byte notation like "K", "Mb", "GB", etc.
@@ -704,11 +705,11 @@
-
+
- Global Max Size before all addresses will enter into their Full Policy configured upon messages being
- produced.
+ Size (in bytes) before all addresses will enter into their Full Policy configured upon messages being
+ produced. Supports byte notation like "K", "Mb", "GB", etc.
@@ -1168,11 +1169,11 @@
-
+
- Any message larger than this size is considered a large message (to be sent in
- chunks)
+ Any message larger than this size (in bytes) is considered a large message (to be sent in
+ chunks). Supports byte notation like "K", "Mb", "GB", etc.
@@ -1251,18 +1252,19 @@
-
+
- Once the bridge has received this many bytes, it sends a confirmation
+ Once the bridge has received this many bytes, it sends a confirmation. Supports byte notation like
+ "K", "Mb", "GB", etc.
-
+
- Producer flow control
+ Producer flow control. Supports byte notation like "K", "Mb", "GB", etc.
@@ -1388,10 +1390,11 @@
-
+
- Messages larger than this are considered large-messages
+ Messages larger than this are considered large-messages. Supports byte notation like
+ "K", "Mb", "GB", etc.
@@ -1485,18 +1488,19 @@
-
+
- The size (in bytes) of the window used for confirming data from the server connected to.
+ The size (in bytes) of the window used for confirming data from the server connected to. Supports
+ byte notation like "K", "Mb", "GB", etc.
-
+
- Producer flow control
+ Producer flow control. Supports byte notation like "K", "Mb", "GB", etc.
@@ -2365,11 +2369,11 @@
-
+
the maximum size (in bytes) for an address (-1 means no limits). This is used in PAGING, BLOCK and
- FAIL policies.
+ FAIL policies. Supports byte notation like "K", "Mb", "GB", etc.
@@ -2385,10 +2389,11 @@
-
+
- the page size (in bytes) to use for an address
+ The page size (in bytes) to use for an address. Supports byte notation like "K", "Mb",
+ "GB", etc.
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 29f8ed6997..1124614180 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
@@ -215,7 +215,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
if (bc.getName().equals("bridge1")) {
Assert.assertEquals("bridge1", bc.getName());
Assert.assertEquals("queue1", bc.getQueueName());
- Assert.assertEquals("minLargeMessageSize", 4, bc.getMinLargeMessageSize());
+ Assert.assertEquals("minLargeMessageSize", 4194304, bc.getMinLargeMessageSize());
assertEquals("check-period", 31, bc.getClientFailureCheckPeriod());
assertEquals("connection time-to-live", 370, bc.getConnectionTTL());
Assert.assertEquals("bridge-forwarding-address1", bc.getForwardingAddress());
@@ -229,6 +229,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
Assert.assertEquals("connector1", bc.getStaticConnectors().get(0));
Assert.assertEquals(null, bc.getDiscoveryGroupName());
Assert.assertEquals(444, bc.getProducerWindowSize());
+ Assert.assertEquals(1073741824, bc.getConfirmationWindowSize());
} else {
Assert.assertEquals("bridge2", bc.getName());
Assert.assertEquals("queue2", bc.getQueueName());
@@ -237,7 +238,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
Assert.assertEquals(null, bc.getTransformerClassName());
Assert.assertEquals(null, bc.getStaticConnectors());
Assert.assertEquals("dg1", bc.getDiscoveryGroupName());
- Assert.assertEquals(555, bc.getProducerWindowSize());
+ Assert.assertEquals(568320, bc.getProducerWindowSize());
}
}
@@ -294,7 +295,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
assertEquals("a1.1", conf.getAddressesSettings().get("a1").getDeadLetterAddress().toString());
assertEquals("a1.2", conf.getAddressesSettings().get("a1").getExpiryAddress().toString());
assertEquals(1, conf.getAddressesSettings().get("a1").getRedeliveryDelay());
- assertEquals(81781728121878L, conf.getAddressesSettings().get("a1").getMaxSizeBytes());
+ assertEquals(856686592L, conf.getAddressesSettings().get("a1").getMaxSizeBytes());
assertEquals(81738173872337L, conf.getAddressesSettings().get("a1").getPageSizeBytes());
assertEquals(10, conf.getAddressesSettings().get("a1").getPageCacheMaxSize());
assertEquals(4, conf.getAddressesSettings().get("a1").getMessageCounterHistoryDayLimit());
diff --git a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
index 65047ac1d4..9ed5584648 100644
--- a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
+++ b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
@@ -140,7 +140,7 @@
bridge-forwarding-address1
org.foo.BridgeTransformer
- 4
+ 4M
31
370
3
@@ -149,6 +149,7 @@
2
false
true
+ 1G
444
connector1
@@ -157,7 +158,7 @@
queue2
bridge-forwarding-address2
- 555
+ 555k
@@ -257,7 +258,7 @@
a1.1
a1.2
1
- 81781728121878
+ 817M
81738173872337
10
4