ARTEMIS-3109 unsetting expiry-address results in excessive logging

This commit is contained in:
Justin Bertram 2021-02-08 14:38:42 -06:00 committed by Clebert Suconic
parent 1647f5e1f1
commit ea6b133ac8
2 changed files with 4 additions and 4 deletions

View File

@ -1048,8 +1048,8 @@ public interface ActiveMQServerLogger extends BasicLogger {
void errorExpiringReferencesNoBindings(SimpleString expiryAddress);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 222147, value = "Messages are being expired on queue {0}. However there is no expiry queue configured, hence messages will be dropped.", format = Message.Format.MESSAGE_FORMAT)
void errorExpiringReferencesNoQueue(SimpleString name);
@Message(id = 222147, value = "Messages are being expired on queue {0}, but there is no Expiry Address configured so messages will be dropped.", format = Message.Format.MESSAGE_FORMAT)
void errorExpiringReferencesNoAddress(SimpleString name);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 222148, value = "Message {0} has exceeded max delivery attempts. No bindings for Dead Letter Address {1} so dropping it",

View File

@ -3491,7 +3491,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
private void expire(final Transaction tx, final MessageReference ref) throws Exception {
SimpleString expiryAddress = addressSettingsRepository.getMatch(address.toString()).getExpiryAddress();
if (expiryAddress != null) {
if (expiryAddress != null && expiryAddress.length() != 0) {
createExpiryResources();
@ -3507,7 +3507,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
if (!printErrorExpiring) {
printErrorExpiring = true;
// print this only once
ActiveMQServerLogger.LOGGER.errorExpiringReferencesNoQueue(name);
ActiveMQServerLogger.LOGGER.errorExpiringReferencesNoAddress(name);
}
acknowledge(tx, ref, AckReason.EXPIRED, null);