2

I have Azure Function that is triggered from IoT Hub (Azure Event Hub).

I can only get message that device send but not the device ID. Because of security reasons I do not want to send device ID in message itself. This somehow should be possible based on this post:

Azure IoT Hub, EventHub and Functions

I tried to change:

public static void Run(string myEventHubMessage, TraceWriter log)

with

public static void Run(EventData myEventHubMessage, TraceWriter log)

but I get error:

The type or namespace name 'EventData' could not be found (are you missing a using directive or an assembly reference?)

I tried to find some documentation how to do that but without success. All that I could find was upper post.

Community
  • 1
  • 1
ButterBeast
  • 521
  • 10
  • 25

1 Answers1

1

Looks like you are just missing the reference and using statement

#r "Microsoft.ServiceBus"

using Microsoft.ServiceBus.Messaging;
Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107
  • Can I get some help here https://stackoverflow.com/questions/54240143/eventhubtriggerattribute-does-not-exists-in-namespace-microsoft-azure-webjobs – kudlatiger Jan 17 '19 at 16:25