summaryrefslogtreecommitdiff
path: root/java/broker/src
diff options
context:
space:
mode:
authorBhupendra Bhusman Bhardwaj <bhupendrab@apache.org>2007-03-05 15:54:44 +0000
committerBhupendra Bhusman Bhardwaj <bhupendrab@apache.org>2007-03-05 15:54:44 +0000
commitd8af3d27e9ad089c9fa52d0943c82da856102bb2 (patch)
tree3ab516ad66f6f9aa2891565985e5566f11492bbb /java/broker/src
parentef2e26031e8de47461a8653ecb764019fe4b603e (diff)
downloadqpid-python-d8af3d27e9ad089c9fa52d0943c82da856102bb2.tar.gz
QPID-388 : hand merged the changes done in perftesting branch
QPID-395 : hand merged the changes done in perftesting branch QPID-375 : default queue config properties should now be under <queues> tag git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@514703 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src')
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java6
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java23
2 files changed, 7 insertions, 22 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
index 429829e201..5bbe1671a7 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
@@ -632,7 +632,11 @@ public class AMQQueue implements Managable, Comparable
protected void updateReceivedMessageCount(AMQMessage msg) throws AMQException
{
- _totalMessagesReceived.incrementAndGet();
+ if (!msg.isRedelivered())
+ {
+ _totalMessagesReceived.incrementAndGet();
+ }
+
try
{
_managedObject.checkForNotification(msg);
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
index c9329a244c..254348dba0 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
@@ -209,7 +209,8 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que
public Long getMaximumQueueDepth()
{
- return _queue.getMaximumQueueDepth();
+ long queueDepthInBytes = _queue.getMaximumQueueDepth();
+ return queueDepthInBytes >> 10 ;
}
public void setMaximumQueueDepth(Long value)
@@ -222,31 +223,11 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que
*/
public Long getQueueDepth() throws JMException
{
- return getQueueDepthKb();
- }
-
- public long getQueueDepthKb()
- {
long queueBytesSize = _queue.getQueueDepth();
return queueBytesSize >> 10 ;
}
/**
- * returns size of message in bytes
- */
- private long getMessageSize(AMQMessage msg) throws AMQException
- {
- if (msg == null)
- {
- return 0l;
- }
-
- return msg.getContentHeaderBody().bodySize;
- }
-
-
-
- /**
* Checks if there is any notification to be send to the listeners
*/
public void checkForNotification(AMQMessage msg) throws AMQException, JMException