You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2015/12/17 22:31:25 UTC
svn commit: r1720664 -
/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession.java
Author: orudyy
Date: Thu Dec 17 21:31:24 2015
New Revision: 1720664
URL: http://svn.apache.org/viewvc?rev=1720664&view=rev
Log:
QPID-6951: Stop tracking closed consumers and remove dead code trying to release pending messages on closed consumers as corresponidng queue is already cleared on consumer close
Modified:
qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession.java
Modified: qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession.java?rev=1720664&r1=1720663&r2=1720664&view=diff
==============================================================================
--- qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession.java (original)
+++ qpid/java/trunk/client/src/main/java/org/apache/qpid/client/AMQSession.java Thu Dec 17 21:31:24 2015
@@ -202,12 +202,6 @@ public abstract class AMQSession<C exten
private final Map<Integer,C> _consumers = new ConcurrentHashMap<>();
- /**
- * Contains a list of consumers which have been removed but which might still have
- * messages to acknowledge, eg in client ack or transacted modes
- */
- private CopyOnWriteArrayList<C> _removedConsumers = new CopyOnWriteArrayList<C>();
-
/** Provides a count of consumers on destinations, in order to be able to know if a destination has consumers. */
private ConcurrentMap<Destination, AtomicInteger> _destinationConsumerCount =
new ConcurrentHashMap<Destination, AtomicInteger>();
@@ -2177,13 +2171,6 @@ public abstract class AMQSession<C exten
}
}
}
-
- // Consumers that are closed in a transaction must be stored
- // so that messages they have received can be acknowledged on commit
- if (_transacted)
- {
- _removedConsumers.add(consumer);
- }
}
}
@@ -3396,13 +3383,6 @@ public abstract class AMQSession<C exten
}
- for (int i = 0; i < _removedConsumers.size(); i++)
- {
- // Sends acknowledgement to server
- _removedConsumers.get(i).rollback();
- _removedConsumers.remove(i);
- }
-
setConnectionStopped(isStopped);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org