I am using an Azure Service Bus (Topic/Subscription) using the premium tier. I ran a sizable stress test that sends a topics to the bus that is sent to one of 5 subscriptions. This stress test was successful where it sent about 20000 messages in about a 20 minute period. Good enough for what I need at this point.
I am following the message send process outlines by Microsoft at message-transfers-locks-settlement
My C# application (which is an Azure function triggered by an http request) is essentially doing this pattern to post:
var tasks = new List<Task>();
for (int i = 0; i < 100; i++)
{
tasks.Add(client.SendAsync(…));
}
await Task.WhenAll(tasks);
I have another Azure Function triggering off of the subscription to process the message. According to documentation, when the Azure Function finishes it completes and removes the message off the bus.
The issue I am having is that in the Azure portal I see that after my test ran the Service Bus has not completely release all the memory that it utilized during the test: Azure Portal Message Bus Memory
For the last couple days, there has been no active messages on the queue or deadlettered messages. Not sure what is using the memory or how to clear it. Not sure if Azure Message Bus has its own garbale collection or not either which may help.
Any thoughts would be very much appreciated as to how to clean up the memory via the portal or programmatically.