We have an issue with ServiceBus service. We have a Queue that contains messages, also we have Continuous WebJob that has OnMessage listener for new messages, everithing works fine, but there is one strange problem. Active message counter never shows less then 2789 Active Messages in Queue. New messages recieved correcly. We tried to recieve messages by Recieve method, but result is the same. Seems something wrong with counter.
Queue configuration:
- Message time to live (default) - 14 days
- Lock duration - 30 sec.
- Duplicate detection history - 10 min
- Maximum Delivery Count - 10
- Maximum size - not set
- Queue state - Active
- Relocate to Dead letter - not enabled
- Current Size - 3447.3994140625 KB
- Updated at - 12.01.2017, 11:56:40
- Enable Partitioning - true
Any ideas will be helpfull.
SOLVED:
Those messages were in Defer state, we used QueueClient.Peek() to get the message, then
var m = QueueClient.Recieve(message.SequenceNumber);
m.Complete();
and messages are Gone!