1
votes

By following the instruction with below code:

const { EventHubClient } = require('@azure/event-hubs');

async function main() {
  const client = await EventHubClient.createFromIotHubConnectionString(process.env["IOTHUB_CONNECTION_STRING"]);
  const hubInfo = await client.getHubRuntimeInformation();
  console.log(hubInfo);
  await client.close();
}

main().catch((err) => {
  console.log(err);
});

I could read Azure IoT Hub messages from built-in endpoints. However, when I route message to a custom endpoint (e.g. Azure Storage containers, Event Hubs), I could no longer read the message.

It there any tool or SDK to help me to read all messages arrived in IoT Hub no matter where the message will be routed?

1
the following route will do it: Endpoint: events, DataSource: Device Telemetry Message, RoutingQuery: trueRoman Kiss

1 Answers

1
votes

Please note that once a Route is created, data stops flowing to the built-in-endpoint unless a Route is created to that endpoint.

Here is a Device Explorer tool, we can use to monitor messages from your devices, and send messages to your devices

If you want to read all messages arrived in IoT Hub no matter where the message will be routed, just add the built-in-endpoint to routes, then you will be able to monitor the data using that tool. Device Explorer