activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: Fix JMSDurableTopicRedeliverTest.testRedeliverNewSession test failure
Date Tue, 06 Dec 2016 14:06:41 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 5f1509c4f -> 38e25caf1


Fix JMSDurableTopicRedeliverTest.testRedeliverNewSession test failure


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

Branch: refs/heads/master
Commit: c4339d809bc199cd7d90eaa7589ea3c76f304929
Parents: 5f1509c
Author: Howard Gao <howard.gao@gmail.com>
Authored: Mon Dec 5 22:06:25 2016 +0800
Committer: Howard Gao <howard.gao@gmail.com>
Committed: Tue Dec 6 11:02:27 2016 +0800

----------------------------------------------------------------------
 .../artemis/core/protocol/openwire/amq/AMQConsumer.java      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c4339d80/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
index 8b80bde..7f4f2d1 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
@@ -48,7 +48,6 @@ import org.apache.activemq.command.RemoveInfo;
 import org.apache.activemq.wireformat.WireFormat;
 
 public class AMQConsumer {
-
    private AMQSession session;
    private org.apache.activemq.command.ActiveMQDestination openwireDestination;
    private ConsumerInfo info;
@@ -319,6 +318,13 @@ public class AMQConsumer {
       long seqId = ref.getMessage().getMessageID();
       long lastDelSeqId = info.getLastDeliveredSequenceId();
 
+      //in activemq5, closing a durable subscription won't close the consumer
+      //at broker. Messages will be treated as if being redelivered to
+      //the same consumer.
+      if (this.info.isDurable() && this.getOpenwireDestination().isTopic()) {
+         return true;
+      }
+
       //because delivering count is always one greater than redelivery count
       //we adjust it down before further calculating.
       ref.decrementDeliveryCount();


Mime
View raw message