mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@613832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
83c3dca9e5
commit
1f2804a76a
|
@ -145,16 +145,21 @@ public class AMQTopicMessageStore extends AMQMessageStore implements TopicMessag
|
||||||
* @param key
|
* @param key
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
protected void acknowledge(ConnectionContext context, MessageId messageId,
|
protected void acknowledge(final ConnectionContext context, MessageId messageId,
|
||||||
Location location, String clientId, String subscriptionName)
|
Location location, String clientId, String subscriptionName)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
MessageAck ack = null;
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
lastLocation = location;
|
lastLocation = location;
|
||||||
|
|
||||||
|
if (topicReferenceStore.acknowledgeReference(context, clientId,
|
||||||
|
subscriptionName, messageId)) {
|
||||||
|
ack = new MessageAck();
|
||||||
|
ack.setLastMessageId(messageId);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (topicReferenceStore.acknowledgeReference(context, clientId,
|
if (ack != null) {
|
||||||
subscriptionName, messageId)) {
|
|
||||||
MessageAck ack = new MessageAck();
|
|
||||||
ack.setLastMessageId(messageId);
|
|
||||||
removeMessage(context, ack);
|
removeMessage(context, ack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue