0
votes

When developing Azure Function thru Class Library approach (local development) I came across issue when using Even Hub compatible endpoint of IoTHub for triggering my function. This is set thru IoTHubTrigger attribute:

 [FunctionName("IoTHubMessageProcessor")]
 public static void Run([IoTHubTrigger("messages/events",  Connection= "IoTHubReceiveEventsConnectionEndpoint")]EventData message, ILogger log)

When using provided connection string and messages/events endpoint I received error stating that "messaging entity could not be found".

enter image description here

1

1 Answers

1
votes

Solution was to alter the connection string and include also Event Hub compatible name in connection string as an entity path so it looks like this:

Endpoint=sb://<Event hub-compatible endpoint>.servicebus.windows.net/;EntityPath=<Event Hub compatible name>;SharedAccessKeyName=<keyName>;SharedAccessKey=<key>"