From eafcb8426e0b3518558405530b323356bee40a93 Mon Sep 17 00:00:00 2001 From: Talal Haddad <37385101+talalhaddad@users.noreply.github.com> Date: Thu, 5 Jan 2023 15:53:39 +0300 Subject: [PATCH] Config fails to load the connection string when initiating the EventHubObserver we are passing the EventHubConfig object, on the observer we are not initiating the values, need to fix the initiator and remove the _config variable from the class as it is not used anywhere. this could be related to issue #149 https://github.com/Azure/azure-stream-analytics/issues/149 --- Samples/TwitterClient/TwitterClient/EventHubObserver.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Samples/TwitterClient/TwitterClient/EventHubObserver.cs b/Samples/TwitterClient/TwitterClient/EventHubObserver.cs index 6277116..ee2d822 100644 --- a/Samples/TwitterClient/TwitterClient/EventHubObserver.cs +++ b/Samples/TwitterClient/TwitterClient/EventHubObserver.cs @@ -24,7 +24,6 @@ namespace TwitterClient public class EventHubObserver : IObserver { private EventHubConfig _config; - private EventHubClient _eventHubClient; public bool AzureOn { get; set; } public EventHubObserver(EventHubConfig config, bool azureOn = true) @@ -36,7 +35,7 @@ public EventHubObserver(EventHubConfig config, bool azureOn = true) _config = config; if (AzureOn) { - _eventHubClient = EventHubClient.CreateFromConnectionString(_config.ConnectionString, config.EventHubName); + _eventHubClient = EventHubClient.CreateFromConnectionString(config.ConnectionString, config.EventHubName); } } catch (Exception ex)