Reputation: 34008
I have an IoT hub which I am trying to monitor the messages coming, I tried both in Visual Studio 2019 and VSCODE, right click on IoTHub monitor built in endpoint and I get this error.
[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
Is this a bug or am I missing come configuration in order to be able to monitor messages?
Upvotes: 1
Views: 996
Reputation: 4085
This error can occur when you have multiple applications reading from an endpoint using the default ($Default) consumer group. As a best practice, you should create a consumer group per consuming application. When you right-click and monitor in VS2019 or VS Code, it uses the default consumer group. So what you can do instead is use the az iot hub monitor-events
command and use the -c
flag to specify a consumer group you created. You can create one in the portal in the Built-in endpoints blade:
Upvotes: 2