我在 azure 函数中遇到 IoTHubtrigger 问题,之前 eit 工作正常,但突然停止在 azure 函数中触发。 这是我的天蓝色函数代码:
`using IoTHubTrigger = Microsoft.Azure.WebJobs.ServiceBus.EventHubTriggerAttribute;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.ServiceBus.Messaging;
using System.Text;
using System.Net.Http;
namespace TestIot
{
public static class Function1
{
private static HttpClient client = new HttpClient();
[FunctionName("Function1")]
public static void Run([IoTHubTrigger("messages/events", Connection = "IoTHubEndpoint")]EventData message, TraceWriter log)
{
log.Info($"C# IoT Hub trigger function processed a message: {Encoding.UTF8.GetString(message.GetBytes())}");
}
}
}`
有人可以帮我解决这个问题吗?我以正确的方式配置了所有内容,但仍然没有在天蓝色功能中收到消息。 如果有人帮助我解决我的问题,我将不胜感激。
我尝试在天蓝色功能中触发 IoT 中心消息,但在天蓝色功能上仍然没有收到任何消息,当我尝试从模拟器设备消息发送消息时,消息已到达 IOTHUB 但未在天蓝色功能中触发。