Configuration configuration = createDefaultConfig();
Map<String, AddressSettings> addresses = new HashMap<String, AddressSettings>();
addresses.put("#", new AddressSettings());
AddressSettings pagedDestinationA = new AddressSettings();
pagedDestinationA.setPageSizeBytes(1024);
pagedDestinationA.setMaxSizeBytes(10 * 1024);
int NUMBER_MESSAGES_BEFORE_PAGING = 11;
addresses.put(PAGED_ADDRESS_A.toString(), pagedDestinationA);
AddressSettings pagedDestinationB = new AddressSettings();
pagedDestinationB.setPageSizeBytes(2024);
pagedDestinationB.setMaxSizeBytes(25 * 1024);
addresses.put(PAGED_ADDRESS_B.toString(), pagedDestinationB);
HornetQServer server = createServer(true, configuration, -1, -1, addresses);