activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [05/17] activemq-artemis git commit: ARTEMIS-816 Log warning during boot if no dead letter/expire address is configured
Date Mon, 24 Oct 2016 13:35:11 GMT
ARTEMIS-816 Log warning during boot if no dead letter/expire address is configured


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/e95e4f77
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/e95e4f77
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/e95e4f77

Branch: refs/heads/ARTEMIS-780
Commit: e95e4f775b1258e33cafa3059755efaa9f9f825e
Parents: 8d4f507
Author: bayern39 <jardenchen@163.com>
Authored: Sat Oct 22 11:28:03 2016 +0800
Committer: bayern39 <jardenchen@163.com>
Committed: Sat Oct 22 11:30:55 2016 +0800

----------------------------------------------------------------------
 .../artemis/core/server/ActiveMQServerLogger.java         | 10 ++++++++++
 .../activemq/artemis/core/server/impl/QueueImpl.java      | 10 ++++++++++
 2 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e95e4f77/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
----------------------------------------------------------------------
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 24432a3..51aa57b 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
@@ -1025,6 +1025,16 @@ public interface ActiveMQServerLogger extends BasicLogger {
    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)
    void groupingQueueRemoved(int size, SimpleString clusterName);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e95e4f77/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
----------------------------------------------------------------------
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 d30544f..b70fe8d 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;


Mime
View raw message