Service Bus for Windows Server - Queue has negative Size

Category: azure servicebus


M. Kempe on Mon, 12 Nov 2012 12:04:14

While doing some performance tests while restarting Message Broker Service I got stuck with the following problem:

The test-queue shows around 200 messages in queue with a 'Size in bytes' of -96525 (negative).

The queue is still working and I can receive new incoming messages, but the 200 messages still remaining in the queue (I'm not sure it there are really 200 msgs in queue - but the namespace-manager says that!). I'm unable to receive till the queue count is 0. This happens every time when i'm restarting the Service Bus Message Broker during send an receive around 100 messages per minute.

Any help appreciated.

Thanks in advance - kind regards,



zivraf on Mon, 12 Nov 2012 20:10:37

Hello Micha,

Are you using Service Bus for Windows Server RTM ?

Please reply with the output of the getQueueDescription call (NamespaceManager)


Ziv , Windows Azure Service Bus team

M. Kempe on Tue, 13 Nov 2012 07:31:14

Hi Ziv,

I'm using Microsoft.ServiceBus.dll - Version

The Microsoft.ServiceBus.MessageBroker.exe Version is 2.0.20922.0

The result of GetQueue is:

DefaultMessageTimeToLive  {00:02:00} System.TimeSpan
DuplicateDetectionHistoryTimeWindow {00:10:00} System.TimeSpan
EnableBatchedOperations   true bool
EnableDeadLetteringOnMessageExpiration false bool
ForwardTo    null string
IsAnonymousAccessible   false bool
LockDuration    {00:01:00} System.TimeSpan
MaxDeliveryCount   10 int
MaxSizeInMegabytes   8796093022207 long
MessageCount    610 long
Path     "System.String" string
RequiresDuplicateDetection  false bool
RequiresSession    false bool
SizeInBytes    -5460 long
Status     Active Microsoft.ServiceBus.Messaging.EntityStatus
SupportOrdering    true bool
UpdatedAt    {13.11.2012 07:14:49} System.DateTime
UserMetadata    null string

Hope it helps....

But, I can easily reproduce this error - so I can send you a sample of my project and you'll see the same problem perhaps ???



Narasimhan Padmanabhan (MSFT) on Tue, 13 Nov 2012 16:11:17


Does your scenario use de-dupe? Can you please send over the sample? Code snippets will do.

Best Regards


M. Kempe on Tue, 13 Nov 2012 16:45:03

Hi Narasimhan,

I'd like to send my test project to you. But how???? eMail Address ?

Cheers, Micha

P.S. You mean duplicate detection? Requires Duplicate Detection: No!

Narasimhan Padmanabhan (MSFT) on Tue, 13 Nov 2012 16:49:36


Can you copy and paste the code snippets?



M. Kempe on Tue, 13 Nov 2012 17:13:41

Too big to copy & paste. I'm using TransientFaultHandling & DynamicThrottling (taken from best practices of Clemens Vasters).... I'd like to show you the full test project....


Narasimhan Padmanabhan (MSFT) on Tue, 13 Nov 2012 17:18:57

Please email to narpad @


M. Kempe on Fri, 16 Nov 2012 09:51:09

Hi Narasimhan,

did you had the time for some investigation of my problem ?



Narasimhan Padmanabhan (MSFT) on Fri, 16 Nov 2012 19:34:02

Hi Micha

The issue is under investigation and we are trying to isolate the problem. Are you currently blocked from making further progress?


M. Kempe on Fri, 16 Nov 2012 20:31:46

No - I'm just curious. Thanks.

Narasimhan Padmanabhan (MSFT) on Wed, 28 Nov 2012 19:45:24

We will ship a fix for this issue early next year.