예제 #1
0
        private void BuildAndRegisterTopic(TopicOptions options, ServiceBusOptions parentOptions)
        {
            var topic = new TopicWrapper(options, parentOptions, _provider);

            topic.Initialize();

            _registry.Register(topic);
        }
예제 #2
0
        private async Task CloseTopicAsync(TopicWrapper topic)
        {
            if (topic.TopicClient.IsClosedOrClosing)
            {
                return;
            }

            try
            {
                await topic.TopicClient.CloseAsync();
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, $"Closing of topic Client {topic.Name} failed");
            }
        }
예제 #3
0
 internal void Register(TopicWrapper topic)
 {
     _topics.Add(topic.Name, topic);
 }