public override bool OnStart()
        {
            // Make sure you provide the corresponding Service Bus connection information in the service configuration file.
            var serviceBusConnectionString = CloudConfigurationManager.GetSetting("ServiceBusConnectionString");
            var topicName = CloudConfigurationManager.GetSetting("TopicName");

            this.queueManager = new QueueManager(serviceBusConnectionString, topicName);
            this.queueManager.SetupTopic();

            return base.OnStart();
        }
        public override bool OnStart()
        {
            // Set the maximum number of concurrent connections 
            ServicePointManager.DefaultConnectionLimit = 12;

            // Make sure you provide the corresponding Service Bus connection information in the service configuration file.
            var connectionString = CloudConfigurationManager.GetSetting("ServiceBusConnectionString");
            var subscriptionName = CloudConfigurationManager.GetSetting("SubscriptionName");
            var topicName = CloudConfigurationManager.GetSetting("TopicName");

            this.queueManager = new QueueManager(connectionString, topicName);

            // create the subscriptions, one for each priority.
            this.queueManager.Setup(subscriptionName, priority: subscriptionName);

            return base.OnStart();
        }