Skip to content

Commit

Permalink
ARTEMIS-2063 improve logging for address/queue deployment
Browse files Browse the repository at this point in the history
(cherry picked from commit 3af9ca0)
  • Loading branch information
jbertram authored and clebertsuconic committed Aug 29, 2018
1 parent 2031515 commit 4f76ef4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Expand Up @@ -94,8 +94,8 @@ public interface ActiveMQServerLogger extends BasicLogger {
void serverStopped(String version, SimpleString nodeId, String uptime);

@LogMessage(level = Logger.Level.INFO)
@Message(id = 221003, value = "Deploying queue {0} on address {1}", format = Message.Format.MESSAGE_FORMAT)
void deployQueue(String queueName, String addressName);
@Message(id = 221003, value = "Deploying {2} queue {0} on address {1}", format = Message.Format.MESSAGE_FORMAT)
void deployQueue(String queueName, String addressName, String routingType);

@LogMessage(level = Logger.Level.INFO)
@Message(id = 221004, value = "{0}", format = Message.Format.MESSAGE_FORMAT)
Expand Down Expand Up @@ -426,6 +426,10 @@ void slowConsumerDetected(String sessionID,
@Message(id = 221079, value = "Ignoring prepare on xid as already called : {0}", format = Message.Format.MESSAGE_FORMAT)
void ignoringPrepareOnXidAlreadyCalled(String xid);

@LogMessage(level = Logger.Level.INFO)
@Message(id = 221080, value = "Deploying address {0} supporting {1}", format = Message.Format.MESSAGE_FORMAT)
void deployAddress(String addressName, String routingTypes);

@LogMessage(level = Logger.Level.WARN)
@Message(id = 222000, value = "ActiveMQServer is being finalized and has not been stopped. Please remember to stop the server before letting it go out of scope",
format = Message.Format.MESSAGE_FORMAT)
Expand Down
Expand Up @@ -2532,14 +2532,15 @@ private void deployAddressesFromConfiguration(Configuration configuration) throw
for (CoreAddressConfiguration config : configuration.getAddressConfigurations()) {
AddressInfo info = new AddressInfo(SimpleString.toSimpleString(config.getName()), config.getRoutingTypes());
addOrUpdateAddressInfo(info);
ActiveMQServerLogger.LOGGER.deployAddress(config.getName(), config.getRoutingTypes().toString());
deployQueuesFromListCoreQueueConfiguration(config.getQueueConfigurations());
}
}

private void deployQueuesFromListCoreQueueConfiguration(List<CoreQueueConfiguration> queues) throws Exception {
for (CoreQueueConfiguration config : queues) {
SimpleString queueName = SimpleString.toSimpleString(config.getName());
ActiveMQServerLogger.LOGGER.deployQueue(config.getName(), config.getAddress());
ActiveMQServerLogger.LOGGER.deployQueue(config.getName(), config.getAddress(), config.getRoutingType().toString());
AddressSettings as = addressSettingsRepository.getMatch(config.getAddress());
// determine if there is an address::queue match; update it if so
int maxConsumerAddressSetting = as.getDefaultMaxConsumers();
Expand Down

0 comments on commit 4f76ef4

Please sign in to comment.