ARTEMIS-2450 page-size-bytes should not be greater than Integer.MAX_VALUE

This commit is contained in:
Wei Yang 2019-08-05 09:28:39 +08:00 committed by Michael Pearce
parent e218678e4f
commit a644c498da
24 changed files with 131 additions and 46 deletions

View File

@ -122,6 +122,30 @@ public final class Validators {
}
};
public static final Validator POSITIVE_INT = new Validator() {
@Override
public void validate(final String name, final Object value) {
Number val = (Number) value;
if (val.longValue() > 0 && val.longValue() <= Integer.MAX_VALUE) {
// OK
} else {
throw ActiveMQMessageBundle.BUNDLE.inRangeOfPositiveInt(name, val);
}
}
};
public static final Validator MINUS_ONE_OR_POSITIVE_INT = new Validator() {
@Override
public void validate(final String name, final Object value) {
Number val = (Number) value;
if (val.longValue() == -1 || (val.longValue() > 0 && val.longValue() <= Integer.MAX_VALUE)) {
// OK
} else {
throw ActiveMQMessageBundle.BUNDLE.inRangeOfPositiveIntThanMinusOne(name, val);
}
}
};
public static final Validator THREAD_PRIORITY_RANGE = new Validator() {
@Override
public void validate(final String name, final Object value) {

View File

@ -599,11 +599,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
config.setJournalSyncNonTransactional(getBoolean(e, "journal-sync-non-transactional", config.isJournalSyncNonTransactional()));
config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", config.getJournalFileSize(), Validators.GT_ZERO));
config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", config.getJournalFileSize(), Validators.POSITIVE_INT));
int journalBufferTimeout = getInteger(e, "journal-buffer-timeout", config.getJournalType() == JournalType.ASYNCIO ? ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO : ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO, Validators.GE_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 journalBufferSize = getTextBytesAsIntBytes(e, "journal-buffer-size", config.getJournalType() == JournalType.ASYNCIO ? ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO : ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO, Validators.POSITIVE_INT);
int journalMaxIO = getInteger(e, "journal-max-io", config.getJournalType() == JournalType.ASYNCIO ? ActiveMQDefaultConfiguration.getDefaultJournalMaxIoAio() : ActiveMQDefaultConfiguration.getDefaultJournalMaxIoNio(), Validators.GT_ZERO);
@ -1049,7 +1049,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
} else if (MAX_SIZE_BYTES_NODE_NAME.equalsIgnoreCase(name)) {
addressSettings.setMaxSizeBytes(ByteUtil.convertTextBytes(getTrimmedTextContent(child)));
} else if (PAGE_SIZE_BYTES_NODE_NAME.equalsIgnoreCase(name)) {
addressSettings.setPageSizeBytes(ByteUtil.convertTextBytes(getTrimmedTextContent(child)));
long pageSizeLong = ByteUtil.convertTextBytes(getTrimmedTextContent(child));
Validators.POSITIVE_INT.validate(PAGE_SIZE_BYTES_NODE_NAME, pageSizeLong);
addressSettings.setPageSizeBytes((int) pageSizeLong);
} 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)) {
@ -1758,7 +1760,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
double retryIntervalMultiplier = getDouble(e, "retry-interval-multiplier", ActiveMQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), Validators.GT_ZERO);
int minLargeMessageSize = getTextBytesAsIntBytes(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.POSITIVE_INT);
long maxRetryInterval = getLong(e, "max-retry-interval", ActiveMQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), Validators.GT_ZERO);
@ -1766,9 +1768,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
int reconnectAttempts = getInteger(e, "reconnect-attempts", ActiveMQDefaultConfiguration.getDefaultClusterReconnectAttempts(), Validators.MINUS_ONE_OR_GE_ZERO);
int confirmationWindowSize = getTextBytesAsIntBytes(e, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), Validators.GT_ZERO);
int confirmationWindowSize = getTextBytesAsIntBytes(e, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(), Validators.POSITIVE_INT);
int producerWindowSize = getTextBytesAsIntBytes(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_POSITIVE_INT);
long clusterNotificationInterval = getLong(e, "notification-interval", ActiveMQDefaultConfiguration.getDefaultClusterNotificationInterval(), Validators.GT_ZERO);
@ -1841,9 +1843,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.GT_ZERO);
int confirmationWindowSize = getTextBytesAsIntBytes(brNode, "confirmation-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.POSITIVE_INT);
int producerWindowSize = getTextBytesAsIntBytes(brNode, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.GT_ZERO);
int producerWindowSize = getTextBytesAsIntBytes(brNode, "producer-window-size", ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize(), Validators.POSITIVE_INT);
long retryInterval = getLong(brNode, "retry-interval", ActiveMQClient.DEFAULT_RETRY_INTERVAL, Validators.GT_ZERO);
@ -1851,7 +1853,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
long connectionTTL = getLong(brNode, "connection-ttl", ActiveMQClient.DEFAULT_CONNECTION_TTL, Validators.GT_ZERO);
int minLargeMessageSize = getTextBytesAsIntBytes(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.POSITIVE_INT);
long maxRetryInterval = getLong(brNode, "max-retry-interval", ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, Validators.GT_ZERO);

View File

@ -61,7 +61,7 @@ public interface PagingStore extends ActiveMQComponent, RefCountMessageListener
long getFirstPage();
long getPageSizeBytes();
int getPageSizeBytes();
long getAddressSize();

View File

@ -91,7 +91,7 @@ public class PagingStoreImpl implements PagingStore {
private long maxSize;
private long pageSize;
private int pageSize;
private volatile AddressFullMessagePolicy addressFullMessagePolicy;
@ -273,7 +273,7 @@ public class PagingStoreImpl implements PagingStore {
}
@Override
public long getPageSizeBytes() {
public int getPageSizeBytes() {
return pageSize;
}

View File

@ -473,4 +473,10 @@ public interface ActiveMQMessageBundle {
@Message(id = 229225, value = "Validated User is not set", format = Message.Format.MESSAGE_FORMAT)
ActiveMQIllegalStateException rejectEmptyValidatedUser();
@Message(id = 229226, value = "{0} must be greater than 0 and less than or equal to Integer.MAX_VALUE (actual value: {1})", format = Message.Format.MESSAGE_FORMAT)
IllegalArgumentException inRangeOfPositiveInt(String name, Number val);
@Message(id = 229227, value = "{0} must be equals to -1 or greater than 0 and less than or equal to Integer.MAX_VALUE (actual value: {1})", format = Message.Format.MESSAGE_FORMAT)
IllegalArgumentException inRangeOfPositiveIntThanMinusOne(String name, Number val);
}

View File

@ -2765,7 +2765,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
}
}
long maxSize = pageSubscription.getPagingStore().getPageSizeBytes();
int maxSize = pageSubscription.getPagingStore().getPageSizeBytes();
long timeout = System.currentTimeMillis() + DELIVERY_TIMEOUT;

View File

@ -42,7 +42,7 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
public static final AddressFullMessagePolicy DEFAULT_ADDRESS_FULL_MESSAGE_POLICY = AddressFullMessagePolicy.PAGE;
public static final long DEFAULT_PAGE_SIZE = 10 * 1024 * 1024;
public static final int DEFAULT_PAGE_SIZE = 10 * 1024 * 1024;
public static final int DEFAULT_MAX_DELIVERY_ATTEMPTS = 10;
@ -111,7 +111,7 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
private Long maxSizeBytes = null;
private Long pageSizeBytes = null;
private Integer pageSizeBytes = null;
private Integer pageMaxCache = null;
@ -500,11 +500,11 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
return this;
}
public long getPageSizeBytes() {
public int getPageSizeBytes() {
return pageSizeBytes != null ? pageSizeBytes : AddressSettings.DEFAULT_PAGE_SIZE;
}
public AddressSettings setPageSizeBytes(final long pageSize) {
public AddressSettings setPageSizeBytes(final int pageSize) {
pageSizeBytes = pageSize;
return this;
}
@ -909,7 +909,8 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
maxSizeBytes = BufferHelper.readNullableLong(buffer);
pageSizeBytes = BufferHelper.readNullableLong(buffer);
Long pageSizeLong = BufferHelper.readNullableLong(buffer);
pageSizeBytes = pageSizeLong == null ? null : pageSizeLong.intValue();
pageMaxCache = BufferHelper.readNullableInteger(buffer);
@ -1046,7 +1047,7 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
return BufferHelper.sizeOfNullableSimpleString(addressFullMessagePolicy != null ? addressFullMessagePolicy.toString() : null) +
BufferHelper.sizeOfNullableLong(maxSizeBytes) +
BufferHelper.sizeOfNullableLong(pageSizeBytes) +
BufferHelper.sizeOfNullableLong(Long.valueOf(pageSizeBytes)) +
BufferHelper.sizeOfNullableInteger(pageMaxCache) +
BufferHelper.sizeOfNullableBoolean(dropMessagesWhenFull) +
BufferHelper.sizeOfNullableInteger(maxDeliveryAttempts) +
@ -1097,7 +1098,7 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
BufferHelper.writeNullableLong(buffer, maxSizeBytes);
BufferHelper.writeNullableLong(buffer, pageSizeBytes);
BufferHelper.writeNullableLong(buffer, Long.valueOf(pageSizeBytes));
BufferHelper.writeNullableInteger(buffer, pageMaxCache);

View File

@ -257,6 +257,35 @@ public class FileConfigurationParserTest extends ActiveMQTestBase {
assertEquals("helloworld", bconfig.getPassword());
}
@Test
public void testParsingOverflowPageSize() throws Exception {
testParsingOverFlow("<address-settings>" + "\n" + "<address-setting match=\"#\">" + "\n" + "<page-size-bytes>2147483648</page-size-bytes>\n" + "</address-setting>" + "\n" + "</address-settings>" + "\n");
testParsingOverFlow("<journal-file-size>2147483648</journal-file-size>");
testParsingOverFlow("<journal-buffer-size>2147483648</journal-buffer-size>");
testParsingOverFlow("<cluster-connections> \n" + " <cluster-connection name=\"my-cluster\"> \n" + " <connector-ref>netty</connector-ref> \n" + " <min-large-message-size>2147483648</min-large-message-size>\n" + " <discovery-group-ref discovery-group-name=\"my-discovery-group\"/> \n" + " </cluster-connection> \n" + "</cluster-connections>");
testParsingOverFlow("<cluster-connections> \n" + " <cluster-connection name=\"my-cluster\"> \n" + " <connector-ref>netty</connector-ref> \n" + " <confirmation-window-size>2147483648</confirmation-window-size>\n" + " <discovery-group-ref discovery-group-name=\"my-discovery-group\"/> \n" + " </cluster-connection> \n" + "</cluster-connections>");
testParsingOverFlow("<cluster-connections> \n" + " <cluster-connection name=\"my-cluster\"> \n" + " <connector-ref>netty</connector-ref> \n" + " <producer-window-size>2147483648</producer-window-size>\n" + " <discovery-group-ref discovery-group-name=\"my-discovery-group\"/> \n" + " </cluster-connection> \n" + "</cluster-connections>");
testParsingOverFlow("<bridges> \n" + " <bridge name=\"price-forward-bridge\"> \n" + " <queue-name>priceForwarding</queue-name> \n" + " <forwarding-address>newYorkPriceUpdates</forwarding-address>\n" + " <min-large-message-size>2147483648</min-large-message-size>\n" + " <static-connectors> \n" + " <connector-ref>netty</connector-ref> \n" + " </static-connectors> \n" + " </bridge> \n" + "</bridges>");
testParsingOverFlow("<bridges> \n" + " <bridge name=\"price-forward-bridge\"> \n" + " <queue-name>priceForwarding</queue-name> \n" + " <forwarding-address>newYorkPriceUpdates</forwarding-address>\n" + " <confirmation-window-size>2147483648</confirmation-window-size>\n" + " <static-connectors> \n" + " <connector-ref>netty</connector-ref> \n" + " </static-connectors> \n" + " </bridge> \n" + "</bridges>\n");
testParsingOverFlow("<bridges> \n" + " <bridge name=\"price-forward-bridge\"> \n" + " <queue-name>priceForwarding</queue-name> \n" + " <forwarding-address>newYorkPriceUpdates</forwarding-address>\n" + " <producer-window-size>2147483648</producer-window-size>\n" + " <static-connectors> \n" + " <connector-ref>netty</connector-ref> \n" + " </static-connectors> \n" + " </bridge> \n" + "</bridges>\n");
}
private void testParsingOverFlow(String config) throws Exception {
FileConfigurationParser parser = new FileConfigurationParser();
String firstPartWithoutAddressSettings = firstPart.substring(0, firstPart.indexOf("<address-settings"));
String configStr = firstPartWithoutAddressSettings + config + lastPart;
ByteArrayInputStream input = new ByteArrayInputStream(configStr.getBytes(StandardCharsets.UTF_8));
try {
Configuration configuration = parser.parseMainConfig(input);
fail("parsing should have failed bcs of overflow page size");
} catch (java.lang.IllegalArgumentException e) {
}
}
private static String bridgePart = "<bridges>\n" +
" <bridge name=\"my-bridge\">\n" +
" <queue-name>sausage-factory</queue-name>\n" +

View File

@ -344,7 +344,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
assertEquals("a1.2", conf.getAddressesSettings().get("a1").getExpiryAddress().toString());
assertEquals(1, conf.getAddressesSettings().get("a1").getRedeliveryDelay());
assertEquals(856686592L, conf.getAddressesSettings().get("a1").getMaxSizeBytes());
assertEquals(81738173872337L, conf.getAddressesSettings().get("a1").getPageSizeBytes());
assertEquals(817381738L, conf.getAddressesSettings().get("a1").getPageSizeBytes());
assertEquals(10, conf.getAddressesSettings().get("a1").getPageCacheMaxSize());
assertEquals(4, conf.getAddressesSettings().get("a1").getMessageCounterHistoryDayLimit());
assertEquals(10, conf.getAddressesSettings().get("a1").getSlowConsumerThreshold());
@ -365,7 +365,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
assertEquals("a2.2", conf.getAddressesSettings().get("a2").getExpiryAddress().toString());
assertEquals(5, conf.getAddressesSettings().get("a2").getRedeliveryDelay());
assertEquals(932489234928324L, conf.getAddressesSettings().get("a2").getMaxSizeBytes());
assertEquals(7126716262626L, conf.getAddressesSettings().get("a2").getPageSizeBytes());
assertEquals(712671626L, conf.getAddressesSettings().get("a2").getPageSizeBytes());
assertEquals(20, conf.getAddressesSettings().get("a2").getPageCacheMaxSize());
assertEquals(8, conf.getAddressesSettings().get("a2").getMessageCounterHistoryDayLimit());
assertEquals(20, conf.getAddressesSettings().get("a2").getSlowConsumerThreshold());

View File

@ -120,6 +120,29 @@ public class ValidatorsTest extends Assert {
ValidatorsTest.failure(Validators.PERCENTAGE_OR_MINUS_ONE, null);
}
@Test
public void testPOSITIVE_INT() {
ValidatorsTest.failure(Validators.POSITIVE_INT, -1);
ValidatorsTest.failure(Validators.POSITIVE_INT, 0);
ValidatorsTest.failure(Validators.POSITIVE_INT, 0.1);
ValidatorsTest.success(Validators.POSITIVE_INT, 1);
ValidatorsTest.success(Validators.POSITIVE_INT, Integer.MAX_VALUE);
ValidatorsTest.failure(Validators.POSITIVE_INT, Integer.MAX_VALUE + 1);
}
@Test
public void testMINUS_ONE_OR_POSITIVE_INT() {
ValidatorsTest.failure(Validators.MINUS_ONE_OR_POSITIVE_INT, -2);
ValidatorsTest.success(Validators.MINUS_ONE_OR_POSITIVE_INT, -1);
ValidatorsTest.failure(Validators.MINUS_ONE_OR_POSITIVE_INT, 0);
ValidatorsTest.failure(Validators.MINUS_ONE_OR_POSITIVE_INT, 0.1);
ValidatorsTest.success(Validators.MINUS_ONE_OR_POSITIVE_INT, 1);
ValidatorsTest.success(Validators.MINUS_ONE_OR_POSITIVE_INT, Integer.MAX_VALUE);
ValidatorsTest.failure(Validators.MINUS_ONE_OR_POSITIVE_INT, Integer.MAX_VALUE + 1);
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------

View File

@ -1399,14 +1399,14 @@ public abstract class ActiveMQTestBase extends Assert {
protected final ActiveMQServer createServer(final boolean realFiles,
final Configuration configuration,
final long pageSize,
final int pageSize,
final long maxAddressSize) {
return createServer(realFiles, configuration, pageSize, maxAddressSize, (Map<String, AddressSettings>) null);
}
protected ActiveMQServer createServer(final boolean realFiles,
final Configuration configuration,
final long pageSize,
final int pageSize,
final long maxAddressSize,
final Map<String, AddressSettings> settings) {
ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(configuration, realFiles));
@ -1426,7 +1426,7 @@ public abstract class ActiveMQTestBase extends Assert {
protected final ActiveMQServer createServer(final boolean realFiles,
final Configuration configuration,
final long pageSize,
final int pageSize,
final long maxAddressSize,
final Map<String, AddressSettings> settings,
StoreConfiguration.StoreType storeType) {

View File

@ -384,7 +384,7 @@
<expiry-address>a1.2</expiry-address>
<redelivery-delay>1</redelivery-delay>
<max-size-bytes>817M</max-size-bytes>
<page-size-bytes>81738173872337</page-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>
@ -408,7 +408,7 @@
<expiry-address>a2.2</expiry-address>
<redelivery-delay>5</redelivery-delay>
<max-size-bytes>932489234928324</max-size-bytes>
<page-size-bytes>7126716262626</page-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>

View File

@ -20,7 +20,7 @@
<expiry-address>a1.2</expiry-address>
<redelivery-delay>1</redelivery-delay>
<max-size-bytes>817M</max-size-bytes>
<page-size-bytes>81738173872337</page-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>
@ -44,7 +44,7 @@
<expiry-address>a2.2</expiry-address>
<redelivery-delay>5</redelivery-delay>
<max-size-bytes>932489234928324</max-size-bytes>
<page-size-bytes>7126716262626</page-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>

View File

@ -213,7 +213,7 @@
<expiry-address>a1.2</expiry-address>
<redelivery-delay>1</redelivery-delay>
<max-size-bytes>81781728121878</max-size-bytes>
<page-size-bytes>81738173872337</page-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>
</address-setting>
@ -222,7 +222,7 @@
<expiry-address>a2.2</expiry-address>
<redelivery-delay>5</redelivery-delay>
<max-size-bytes>932489234928324</max-size-bytes>
<page-size-bytes>7126716262626</page-size-bytes>
<page-size-bytes>712671626</page-size-bytes>
<page-max-cache-size>20</page-max-cache-size>
<message-counter-history-day-limit>AA</message-counter-history-day-limit>
</address-setting>

View File

@ -213,7 +213,7 @@
<expiry-address>a1.2</expiry-address>
<redelivery-delay>1</redelivery-delay>
<max-size-bytes>81781728121878</max-size-bytes>
<page-size-bytes>81738173872337</page-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>
</address-setting>
@ -222,7 +222,7 @@
<expiry-address>a2.2</expiry-address>
<redelivery-delay>5</redelivery-delay>
<max-size-bytes>932489234928324</max-size-bytes>
<page-size-bytes>7126716262626</page-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>
</address-setting>

View File

@ -213,7 +213,7 @@
<expiry-address>a1.2</expiry-address>
<redelivery-delay>1</redelivery-delay>
<max-size-bytes>81781728121878</max-size-bytes>
<page-size-bytes>81738173872337</page-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>
</address-setting>
@ -222,7 +222,7 @@
<expiry-address>a2.2</expiry-address>
<redelivery-delay>5</redelivery-delay>
<max-size-bytes>932489234928324</max-size-bytes>
<page-size-bytes>7126716262626</page-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>
</address-setting>

View File

@ -214,7 +214,7 @@
<expiry-address>a1.2</expiry-address>
<redelivery-delay>1</redelivery-delay>
<max-size-bytes>81781728121878</max-size-bytes>
<page-size-bytes>81738173872337</page-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>
</address-setting>
@ -223,7 +223,7 @@
<expiry-address>a2.2</expiry-address>
<redelivery-delay>5</redelivery-delay>
<max-size-bytes>932489234928324</max-size-bytes>
<page-size-bytes>7126716262626</page-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>
</address-setting>

View File

@ -212,7 +212,7 @@
<expiry-address>a1.2</expiry-address>
<redelivery-delay>1</redelivery-delay>
<max-size-bytes>81781728121878</max-size-bytes>
<page-size-bytes>81738173872337</page-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>
</address-setting>
@ -221,7 +221,7 @@
<expiry-address>a2.2</expiry-address>
<redelivery-delay>5</redelivery-delay>
<max-size-bytes>932489234928324</max-size-bytes>
<page-size-bytes>7126716262626</page-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>
</address-setting>

View File

@ -215,7 +215,7 @@
<expiry-address>a1.2</expiry-address>
<redelivery-delay>1</redelivery-delay>
<max-size-bytes>81781728121878</max-size-bytes>
<page-size-bytes>81738173872337</page-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>
</address-setting>
@ -224,7 +224,7 @@
<expiry-address>a2.2</expiry-address>
<redelivery-delay>5</redelivery-delay>
<max-size-bytes>932489234928324</max-size-bytes>
<page-size-bytes>7126716262626</page-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>
</address-setting>

View File

@ -83,7 +83,7 @@ public class AmqpBridgeClusterRedistributionTest extends AmqpClientTestSupport {
@Override
protected ActiveMQServer createServer(final boolean realFiles,
final Configuration configuration,
final long pageSize,
final int pageSize,
final long maxAddressSize,
final Map<String, AddressSettings> settings) {
ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(configuration, realFiles));

View File

@ -45,7 +45,7 @@ public class ExclusiveDivertWithClusterTest extends ClusterTestBase {
@Override
protected ActiveMQServer createServer(final boolean realFiles,
final Configuration configuration,
final long pageSize,
final int pageSize,
final long maxAddressSize,
final Map<String, AddressSettings> settings) {
DivertConfiguration divertConf = new DivertConfiguration().setName("notifications-divert").setAddress("*.Provider.*.Agent.*.Status").setForwardingAddress("Notifications").setExclusive(true);

View File

@ -70,7 +70,7 @@ public class GlobalPagingTest extends PagingTest {
@Override
protected ActiveMQServer createServer(final boolean realFiles,
final Configuration configuration,
final long pageSize,
final int pageSize,
final long maxAddressSize,
final Map<String, AddressSettings> settings) {
ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(configuration, realFiles));

View File

@ -75,7 +75,7 @@ public class OpenwirePluginTest extends BasicOpenWireTest {
private final MethodCalledVerifier verifier = new MethodCalledVerifier(methodCalls);
@Override
protected ActiveMQServer createServer(boolean realFiles, Configuration configuration, long pageSize,
protected ActiveMQServer createServer(boolean realFiles, Configuration configuration, int pageSize,
long maxAddressSize, Map<String, AddressSettings> settings) {
ActiveMQServer server = super.createServer(realFiles, configuration, pageSize, maxAddressSize, settings);
server.registerBrokerPlugin(verifier);

View File

@ -303,7 +303,7 @@ public class PersistMultiThreadTest extends ActiveMQTestBase {
}
@Override
public long getPageSizeBytes() {
public int getPageSizeBytes() {
return 0;
}