-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service Bus Scheduled Message Count Is Negative #254
Comments
Thanks for reporting this. we're tracking this internally. |
This is happening to me too, but I'm deleting the scheduled messages by their Sequence Number. Same negative information on both ServiceBusExplorer and Azure Portal. |
we're currently working to fix this. I'll update and close this issue when we have sorted this out. |
@axisc the label |
Hi @rcreynolds53 & @calvaradocl , just want to confirm for debugging purpose, was there any activities (scheduling / send / receive messages) while the cancellation was going on? Also, is the piece of code running as a single instance? I.e., are there multiple instances of this code running in parallel maybe with cancelling faster in mind? Thank you. |
Update: we have checked in the fix for both standard and premium messaging, the fix is expected to be included in the next major deployment. |
This is still happening within our subscriptions. Our sagas depend on scheduled messages and our ops team is complaining that they can't rely on this number. |
Same here. Still happening on our side. |
Description
When cancelling scheduled messages without knowing the sequence number, I used the following
code using the ServiceBus Message Receiver Class to peek at all messages and then cancel the scheduled messages async. Instead of stopping at zero, when there were no more messages to cancel, the service bus kept deleting messages from the scheduled queue and ended up with a negative number
CODE
var messages = await messageReceiver.PeekAsync(250);
do
{
Console.WriteLine(messages.Count);
await Task.WhenAll(messages.Select(m =>
{
Console.WriteLine(m.SystemProperties.SequenceNumber);
return queueClient.CancelScheduledMessageAsync(m.SystemProperties.SequenceNumber);
}));
messages = await messageReceiver.PeekAsync(250);
} while (messages.Count > 0);
Here is a picture of the message count:
Actual Behavior
Expected Behavior
The text was updated successfully, but these errors were encountered: