public AzureServiceBusTopicPublisherClient(AzureServiceBusTopicPublisherEndpoint endpoint,
                                                   IAzureServiceBusConfiguration sbConfiguration)
            : base(sbConfiguration)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException("endpoint");
            }

            endpoint.Validate();

            try
            {
                if (NsManager.TopicExists(endpoint.TopicName) == false)
                {
                    NsManager.CreateTopic(endpoint.TopicName);
                }

                topicClient = TopicClient.CreateFromConnectionString(sbConfiguration.ConnectionString,
                                                                     endpoint.TopicName);

                topicClient.RetryPolicy = RetryExponential.Default;
            }
            catch (Exception ex)
            {
                throw new MessagingException(
                          String.Format(
                              "An error occurred while attempting to access the specified Azure service bus topic [{0}]. See inner exception for more details.",
                              endpoint.TopicName),
                          ex);
            }
        }
        public AzureServiceBusTopicPublisherEndpointManager(AzureServiceBusTopicPublisherEndpoint endpoint,
                                                            IAzureServiceBusConfiguration sbConfiguration)
            : base(sbConfiguration)
        {
            if (endpoint == null)
                throw new ArgumentNullException("endpoint");

            endpoint.Validate();

            this.endpoint = endpoint;
        }
        public AzureServiceBusTopicPublisherEndpointManager(AzureServiceBusTopicPublisherEndpoint endpoint,
                                                            IAzureServiceBusConfiguration sbConfiguration)
            : base(sbConfiguration)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException("endpoint");
            }

            endpoint.Validate();

            this.endpoint = endpoint;
        }