I'm trying to complete the tutorial of Azure Stream Analytics that using an app provided by Microsoft docs to send data to Azure Event Hub, to be simple, I'm just following this tutorial.
Now I got stuck at the step: "Start the event generator application"
What I have done is:
Create the Azure Event Hub & Azure Event Hub Namespace
Create the policy at "Shared access policies" (as below)
- Update the element in the config file (telcodatagen.exe.config, as below)
The below file can be download here.
Here are the values I filled in at the shelter in the previous image:
<add key="EventHubName" value="***My Event Hubs Namespace***"/>
<add key="Microsoft.ServiceBus.ConnectionString" value="***My Connection string–primary key without the EntityPath value***"/>
But when I run the below command at CMD:
telcodatagen.exe 1000 0.2 2
I got an error as the figure below (error on send: one or more error occurred):
I'm completely brand new to Azure Event Hub and Azure Stream Analytics and I can guarantee to follow the steps of the tutorial, but I am not sure what the error is, why this error occurs and how to debug.
Any solution? Thanks!
Your
ConnectionString
is wrong.You should get it from namespace,not Instance.
And
EventHubName
is your Event Hubs Instance's name.By the way,you can download c# code from Github.
Hope this can help you:).