Beispiel #1
0
        /// <summary>
        /// create new servicebus queue
        /// </summary>
        /// <param name="name">name of the queue</param>
        /// <param name="overwrite">overwrite existing queue?</param>
        public void createQueue(string name, bool overwrite)
        {
            if (namespaceManager == null)
            {
                namespaceManager = new NamespaceManager(connBuilder.GetAbsoluteManagementEndpoints(), localUserTokenProvider);
            }

            if (namespaceManager.QueueExists(name) && overwrite)
            {
                namespaceManager.DeleteQueue(name);
            }
            if (!namespaceManager.QueueExists(name))
            {
                namespaceManager.CreateQueue(name);
            }
        }