This closes #904
This commit is contained in:
commit
38e25caf1d
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue