Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Memory leak in the Azure Service Bus Queue

$
0
0

Hi guys,

I am using Azure Service Bus Queue as described here:

https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-queues/#comments

Source code is following:

...

            string connectionString = CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString.Import");
            string importQueueName = CloudConfigurationManager.GetSetting("ImportQueueName");

            var namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString);

            if (namespaceManager.QueueExists(importQueueName))
            {
                QueueClient client = QueueClient.CreateFromConnectionString(connectionString, importQueueName);
                BrokeredMessage message = new BrokeredMessage(XmlTextBox.Text);
                message.Properties["BusinessUnitCode"] = BusinessUnitTextEdit.Text;
                message.Properties["DocumentType"] = DocumentTypeComboBox.Text;
                client.Send(message);
                MessageBox.Show("Sent");
            }
            else
                MessageBox.Show("Not found!");

...

Every time this code is executed memory leaks approximately 1Mb. I tried to put "BrokeredMessage" inside "using" statement but that did not help either.

Is there anything that I am missing?

Thanks in advance.


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>