activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1145092 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
Date Mon, 11 Jul 2011 09:37:40 GMT
Author: gtully
Date: Mon Jul 11 09:37:40 2011
New Revision: 1145092

URL: http://svn.apache.org/viewvc?rev=1145092&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-2584 - revisit, make audit optional on dlq stragegy,
new attribute enableAudit default true. Set to false if resending to the dlq is required,
can be usefull when redelivery from the dlq to the original dest is required and can repeat

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java?rev=1145092&r1=1145091&r2=1145092&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/AbstractDeadLetterStrategy.java
Mon Jul 11 09:37:40 2011
@@ -34,13 +34,14 @@ public abstract class AbstractDeadLetter
     private static final Logger LOG = LoggerFactory.getLogger(AbstractDeadLetterStrategy.class);
     private boolean processNonPersistent = false;
     private boolean processExpired = true;
-    private ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
+    private boolean enableAudit = true;
+    private ActiveMQMessageAudit messageAudit = new ActiveMQMessageAudit();
 
     public boolean isSendToDeadLetterQueue(Message message) {
         boolean result = false;
         if (message != null) {
             result = true;
-            if (audit.isDuplicate(message)) {
+            if (enableAudit && messageAudit.isDuplicate(message)) {
                 result = false;
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("Not adding duplicate to DLQ: " + message.getMessageId() +
", dest: " + message.getDestination());
@@ -84,4 +85,11 @@ public abstract class AbstractDeadLetter
         this.processNonPersistent = processNonPersistent;
     }
 
+    public boolean isEnableAudit() {
+        return enableAudit;
+    }
+
+    public void setEnableAudit(boolean enableAudit) {
+        this.enableAudit = enableAudit;
+    }
 }



Mime
View raw message