diff options
| author | Robert Greig <rgreig@apache.org> | 2006-12-18 18:05:25 +0000 |
|---|---|---|
| committer | Robert Greig <rgreig@apache.org> | 2006-12-18 18:05:25 +0000 |
| commit | 5e1581b80ac42c9b6f90f2cab1524cd945a9ca5b (patch) | |
| tree | 6bbffb82ac5a1a2d16a360936201f515dd863c90 /java/broker/src | |
| parent | 9876d09ea5ec9718cf7c3e994bb4588ce42b7e17 (diff) | |
| download | qpid-python-5e1581b80ac42c9b6f90f2cab1524cd945a9ca5b.tar.gz | |
QPID-212 QPID-214 Patch supplied by Rob Godfrey
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@488377 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src')
| -rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java | 11 | ||||
| -rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java | 13 |
2 files changed, 15 insertions, 9 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java b/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java index a6cb4523cf..b0fbafac56 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java +++ b/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java @@ -7,9 +7,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -397,7 +397,7 @@ public class AMQChannel long deliveryTag = entry.getKey(); String consumerTag = entry.getValue().consumerTag; AMQMessage msg = entry.getValue().message; - + msg.setRedelivered(true); session.writeFrame(msg.getDataBlock(_channelId, consumerTag, deliveryTag)); } } @@ -495,6 +495,11 @@ public class AMQChannel private void handleAcknowledgement(long deliveryTag, boolean multiple) throws AMQException { + if (_log.isDebugEnabled()) + { + _log.debug("Handling acknowledgement for channel " + _channelId + " with delivery tag " + deliveryTag + + " and multiple " + multiple); + } if (multiple) { LinkedList<UnacknowledgedMessage> acked = new LinkedList<UnacknowledgedMessage>(); diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java index 8b6db5b53f..12e06b31ed 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java +++ b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java @@ -7,9 +7,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -102,7 +102,7 @@ public class AMQMessage public AMQMessage(MessageStore store, long messageId, BasicPublishBody publishBody, ContentHeaderBody contentHeaderBody, List<ContentBody> contentBodies) throws AMQException - + { _publishBody = publishBody; _contentHeaderBody = contentHeaderBody; @@ -116,7 +116,7 @@ public class AMQMessage ContentHeaderBody contentHeaderBody, List<ContentBody> contentBodies) throws AMQException { - this(store, store.getNewMessageId(), publishBody, contentHeaderBody, contentBodies); + this(store, store.getNewMessageId(), publishBody, contentHeaderBody, contentBodies); } protected AMQMessage(AMQMessage msg) throws AMQException @@ -211,6 +211,7 @@ public class AMQMessage return _bodyLengthReceived == _contentHeaderBody.bodySize; } + public boolean isRedelivered() { return _redelivered; @@ -236,7 +237,7 @@ public class AMQMessage return new NoConsumersException(queue, _publishBody, _contentHeaderBody, _contentBodies); } - void setRedelivered(boolean redelivered) + public void setRedelivered(boolean redelivered) { _redelivered = redelivered; } @@ -346,7 +347,7 @@ public class AMQMessage } /** - * Called to enforce the 'immediate' flag. + * Called to enforce the 'immediate' flag. * @throws NoConsumersException if the message is marked for * immediate delivery but has not been marked as delivered to a * consumer |
