ARTEMIS-947 reload <addresses> on broker.xml change

This commit is contained in:
Justin Bertram 2017-02-07 13:45:24 -06:00
parent a39b9e55e7
commit f5599c6630
2 changed files with 9 additions and 3 deletions

View File

@ -2226,6 +2226,10 @@ public class ActiveMQServerImpl implements ActiveMQServer {
} }
private void deployAddressesFromConfiguration() throws Exception { private void deployAddressesFromConfiguration() throws Exception {
deployAddressesFromConfiguration(configuration);
}
private void deployAddressesFromConfiguration(Configuration configuration) throws Exception {
for (CoreAddressConfiguration config : configuration.getAddressConfigurations()) { for (CoreAddressConfiguration config : configuration.getAddressConfigurations()) {
AddressInfo info = new AddressInfo(SimpleString.toSimpleString(config.getName()), config.getRoutingTypes()); AddressInfo info = new AddressInfo(SimpleString.toSimpleString(config.getName()), config.getRoutingTypes());
addOrUpdateAddressInfo(info); addOrUpdateAddressInfo(info);
@ -2719,6 +2723,8 @@ public class ActiveMQServerImpl implements ActiveMQServer {
deployDivert(divertConfig); deployDivert(divertConfig);
} }
} }
ActiveMQServerLogger.LOGGER.reloadingConfiguration("addresses");
deployAddressesFromConfiguration(config);
} }
} }
} }

View File

@ -6,8 +6,8 @@ Once the configuration file is changed (broker.xml) the following modules will b
- Address Settings - Address Settings
- Security Settings - Security Settings
- JMS Queues - Diverts
- JMS Topics - Addresses & queues
Notice: Queues and Topics won't be removed upon reload, given the risk of losing messages. You may execute explicit CLI or Management operations to remove destinations. Notice: Address & queues won't be removed upon reload, given the risk of losing messages. You may execute explicit CLI or Management operations to remove destinations.