From 74dbde147951a10f7d9d817eb86046845087a00f Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Tue, 24 Oct 2006 11:50:09 +0000 Subject: QPID-48 Enabled buffer compression on delivery queue as a configuration option from the xml.(advanced.compressBufferOnQueue) Changed DeliveryManager.java to use ConcurrentLinkedQueueNoSize.java this is the standard ConcurrentLinkedQueue but where the size() method returns 0(empty) or 1(has content) as it is an expensive operation. Previously there was a race condition with the use of the _queueing boolean. Under load the consumer would sometimes stop getting messages. This was due to the messages being enqueued without starting the Worker thread. There is still an issue (QPID-54) on high receiving load messages rate received by a client drops. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@467313 13f79535-47bb-0310-9956-ffa450edef68 --- java/common/src/org/apache/qpid/framing/ContentBody.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'java/common/src') diff --git a/java/common/src/org/apache/qpid/framing/ContentBody.java b/java/common/src/org/apache/qpid/framing/ContentBody.java index d7b668534c..14344a3870 100644 --- a/java/common/src/org/apache/qpid/framing/ContentBody.java +++ b/java/common/src/org/apache/qpid/framing/ContentBody.java @@ -63,8 +63,7 @@ public class ContentBody extends AMQBody ByteBuffer newPayload = ByteBuffer.allocate(size); newPayload.put(payload); - newPayload.position(0); - newPayload.limit(size); + newPayload.flip(); //reduce reference count on payload payload.release(); -- cgit v1.2.1