git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@613832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-01-21 10:33:55 +00:00
parent 83c3dca9e5
commit 1f2804a76a
1 changed files with 10 additions and 5 deletions

View File

@ -145,16 +145,21 @@ public class AMQTopicMessageStore extends AMQMessageStore implements TopicMessag
* @param key
* @throws IOException
*/
protected void acknowledge(ConnectionContext context, MessageId messageId,
protected void acknowledge(final ConnectionContext context, MessageId messageId,
Location location, String clientId, String subscriptionName)
throws IOException {
MessageAck ack = null;
synchronized (this) {
lastLocation = location;
if (topicReferenceStore.acknowledgeReference(context, clientId,
subscriptionName, messageId)) {
ack = new MessageAck();
ack.setLastMessageId(messageId);
}
}
if (topicReferenceStore.acknowledgeReference(context, clientId,
subscriptionName, messageId)) {
MessageAck ack = new MessageAck();
ack.setLastMessageId(messageId);
if (ack != null) {
removeMessage(context, ack);
}
}