From f6b46080d91481fd72b8b8933180068911edeb38 Mon Sep 17 00:00:00 2001 From: Dinar Gainitdinov Date: Fri, 12 Feb 2016 12:22:45 +0300 Subject: [PATCH] Fixed name - should be ServiceBus connection string instead of Event Hub connection string. --- Azure/AppToNotifyUsers/WorkerHost/App.config | 6 +++--- Azure/AppToNotifyUsers/WorkerHost/ConfigurationLoader.cs | 6 +++--- Azure/AppToNotifyUsers/WorkerHost/Program.cs | 2 +- Azure/AppToNotifyUsers/readme.md | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Azure/AppToNotifyUsers/WorkerHost/App.config b/Azure/AppToNotifyUsers/WorkerHost/App.config index 52d97adc..aaad098e 100644 --- a/Azure/AppToNotifyUsers/WorkerHost/App.config +++ b/Azure/AppToNotifyUsers/WorkerHost/App.config @@ -27,10 +27,10 @@ To find, open Azure management portal, select Namespace -> Event Hub -> connection information -> connection string Example format (imaginary values): - + --> - - + + diff --git a/Azure/AppToNotifyUsers/WorkerHost/ConfigurationLoader.cs b/Azure/AppToNotifyUsers/WorkerHost/ConfigurationLoader.cs index c1097ab0..0cf95e71 100644 --- a/Azure/AppToNotifyUsers/WorkerHost/ConfigurationLoader.cs +++ b/Azure/AppToNotifyUsers/WorkerHost/ConfigurationLoader.cs @@ -29,7 +29,7 @@ namespace WorkerHost { public class AppConfiguration { - public string DeviceEHConnectionString; + public string DeviceSBConnectionString; public string DeviceEHName; @@ -155,8 +155,8 @@ public static AppConfiguration GetConfig() AppConfiguration config = new AppConfiguration { - DeviceEHConnectionString = - ConfigurationManager.AppSettings.Get("Microsoft.ServiceBus.EventHubConnectionString"), + DeviceSBConnectionString = + ConfigurationManager.AppSettings.Get("Microsoft.ServiceBus.ServiceBusConnectionString"), DeviceEHName = ConfigurationManager.AppSettings.Get("Microsoft.ServiceBus.EventHubToMonitor"), NotificationService = ConfigurationManager.AppSettings.Get("NotificationService"), EmailServiceUserName = ConfigurationManager.AppSettings.Get("SenderUserName"), diff --git a/Azure/AppToNotifyUsers/WorkerHost/Program.cs b/Azure/AppToNotifyUsers/WorkerHost/Program.cs index b642f446..b74c1bcc 100644 --- a/Azure/AppToNotifyUsers/WorkerHost/Program.cs +++ b/Azure/AppToNotifyUsers/WorkerHost/Program.cs @@ -157,7 +157,7 @@ private static void PrepareMailAddressInstances() public static void Process() { - _EventHubReader.Run(_Config.DeviceEHConnectionString, _Config.DeviceEHName, string.Empty); + _EventHubReader.Run(_Config.DeviceSBConnectionString, _Config.DeviceEHName, string.Empty); _EventHubReader.FailureEvent.WaitOne(); } diff --git a/Azure/AppToNotifyUsers/readme.md b/Azure/AppToNotifyUsers/readme.md index 1c9e9f07..d994b9bf 100644 --- a/Azure/AppToNotifyUsers/readme.md +++ b/Azure/AppToNotifyUsers/readme.md @@ -58,14 +58,14 @@ There are three sections of App.config you will need to change - to specify the ## Step 1: Specifying the Event Hub to Monitor ## The code in the [AppToNotifyUsers](https://github.com/Azure/connectthedots/tree/master/Azure/AppToNotifyUsers) solution creates an Azure Cloud Service (worker role) that monitors an event hub identified by a URL you list a config file, App.config, together with the Shared Key that grants you access. The strings in App.config that needs to be modified are the following: ``` - - + + ``` -If you deploy the example in the Connect The Dots, that event hub is called ehalerts, and you would replace [event hub name] with 'ehalerts', and the EventHubConnectionString string with the connection string for it, that you can find in the Azure management portal. It should look something like this: +If you deploy the example in the Connect The Dots, that event hub is called ehalerts, and you would replace [Event Hub name] with 'ehalerts', and the ServiceBusConnectionString string with the connection string for it, that you can find in the Azure management portal. It should look something like this: ``` - + ``` The EventHubReader module in the code uses this information to get messages from ehalerts, and put it in a queue to be sent by whatever method you specify.