Is Azure Service TopicClient Thread Safe & Reusable?

Viewed 2040

We are using Azure SDK to publish message to Service Bus. In Web API call we're doing these tasks repeatedly for each incoming request

MessagingFactory factory = MessagingFactory.CreateFromConnectionString(conStr);
factory.RetryPolicy = new RetryExponential(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(2), 3);
var namespaceManager = NamespaceManager.CreateFromConnectionString(conStr);

TopicClient topicClient = factory.CreateTopicClient(topicName);

Can topicClient be converted into Singleton & reused across multiple threads?

1 Answers
Related