Is eventHubClient.SendAsync thread safe? That is, can I get one instance of EventHubClient from EventHubClient.CreateFromConnectionString() and use it to write to event hub from multiple threads. This the code I am using, Logger.Log will be used by many threads in a asp.net web application.
Could not find the answer for this in the documentation..
class Logger
{
...
static EventHubClient eventHubClient;
static Logger()
{
eventHubClient = EventHubClient.CreateFromConnectionString(hubConnectionString, eventHubName);
}
public static void Log()
{
...
eventHubClient.SendAsync(eventObject);
}
}