diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java index 24432a3aa2..51aa57b7d0 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java @@ -1024,6 +1024,16 @@ public interface ActiveMQServerLogger extends BasicLogger { @Message(id = 222164, value = "Error when trying to start replication {0}", format = Message.Format.MESSAGE_FORMAT) void errorStartingReplication(BackupReplicationStartFailedMessage.BackupRegistrationProblem problem); + @LogMessage(level = Logger.Level.WARN) + @Message(id = 222165, value = "No Dead Letter Address configured for queue {0} in AddressSettings", + format = Message.Format.MESSAGE_FORMAT) + void AddressSettingsNoDLA(SimpleString name); + + @LogMessage(level = Logger.Level.WARN) + @Message(id = 222166, value = "No Expiry Address configured for queue {0} in AddressSettings", + format = Message.Format.MESSAGE_FORMAT) + void AddressSettingsNoExpiryAddress(SimpleString name); + @LogMessage(level = Logger.Level.WARN) @Message(id = 222167, value = "Group Binding not available so deleting {0} groups from {1}, groups will be bound to another node", format = Message.Format.MESSAGE_FORMAT) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java index d30544fbbd..b70fe8d3ea 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java @@ -2989,10 +2989,20 @@ public class QueueImpl implements Queue { public void onChange() { AddressSettings settings = addressSettingsRepository.getMatch(address.toString()); configureExpiry(settings); + checkDeadLetterAddressAndExpiryAddress(settings); configureSlowConsumerReaper(settings); } } + private void checkDeadLetterAddressAndExpiryAddress(final AddressSettings settings) { + if (settings.getDeadLetterAddress() == null) { + ActiveMQServerLogger.LOGGER.AddressSettingsNoDLA(name); + } + if (settings.getExpiryAddress() == null) { + ActiveMQServerLogger.LOGGER.AddressSettingsNoExpiryAddress(name); + } + } + private final class SlowConsumerReaperRunnable implements Runnable { private final SlowConsumerPolicy policy;