监视器内置事件端点消息中的错误:至少为端点创建了一个接收者,纪元为“3”,

Error in monitor built-in event endpoint message: At least one receiver for the endpoint is created with epoch of '3',

我有一个 IoT 中心,我正在尝试监视传入的消息,我在 Visual Studio 2019 年和 VSCODE 都尝试过,右键单击端点内置的 IoTHub 监视器,我收到此错误.

   [Monitor Built-in Event Endpoint Message] [30/10/2020 8:55:07] Error in monitor built-in event endpoint message: At least one receiver for the endpoint is created with epoch of '5', and so non-epoch receiver is not allowed. Either reconnect with a higher epoch, or make sure all epoch receivers are closed or disconnected. TrackingId:7820ccc9-5616-45ec-9741-ca4249ccf48d_B40, SystemTracker:iothub-ns-iothub-4065561-9e6a99dc51:eventhub:iothub~16383, Timestamp:2020-10-30T07:55:07 Reference:f581627d-bc16-49cd-b131-a5d226798f00, TrackingId:8bfbfae5-27bb-4b92-bbbf-c7dbb965e40d_B40, SystemTracker:iothub-ns-iothub-4065561-9e6a99dc51:eventhub:iothub~16383|$default, Timestamp:2020-10-30T07:55:07, referenceId: 2824199bd7ab4e40ab374ebbbd1a0a6d_B40
    [Monitor Built-in Event Endpoint Message] [30/10/2020 8:55:07] Error in monitor built-in event endpoint message: At least one receiver for the endpoint is created with epoch of '3', and so non-epoch receiver is not allowed. Either reconnect with a higher epoch, or make sure all epoch receivers are closed or disconnected. TrackingId:aa69e101-bcac-4618-8d81-594650020011_B29, SystemTracker:iothub-ns-iothub-4065561-9e6a99dc51:eventhub:iothub~32766|iothubconsumergroup, Timestamp:2020-10-30T07:55:07 Reference:10dba550-1feb-4fac-8a45-19493590d913, TrackingId:f51c6b43-7f48-4dca-8ef9-ab2f9459252f_B29, SystemTracker:iothub-ns-iothubpo-4065561-9e6a99dc51:eventhub:iothub~32766|$default, Timestamp:2020-10-30T07:55:07, referenceId: 94788bff384946c482b1667df28da3f1_B29

这是错误还是我缺少配置以便能够监控消息?

当您有多个应用程序使用默认的 ($Default) 消费者组从端点读取时,可能会发生此错误。作为最佳实践,您应该为每个消费应用程序创建一个消费者组。当你在 VS2019 或 VS Code 中 right-click 和监控时,它使用默认的消费者组。所以你可以做的是使用 az iot hub monitor-events 命令并使用 -c 标志来指定你创建的消费者组。您可以在 Built-in 端点边栏选项卡的门户中创建一个: