I am sending some messages from a Azure sphere device to IoT hub, now I want to send/route these messages to a MQTT broker from where I can get this messages and display it in third party software. Please guide me I am new to this topic, any leads or suggestions would be helpful.
Asked
Active
Viewed 850 times
2
-
Maybe this can help you: https://stackoverflow.com/questions/50417822/azure-iot-hub-subscribe-code-not-working-connection-was-refused – Dalton Cézane Jan 21 '19 at 14:48
-
Do you want to connect your Azure Sphere Device directly to an MQTT broker or route it from IoTHub to there? Can you be more specific? What broker you want to connect to and what research you did so far + where were you blocked? Thanks – asergaz Jan 24 '19 at 14:12
-
I am using mosquitto broker. Now I can read the messages on localhost and be able to send it to broker. I used existing tutorial present on Azure IoT hub docs to read the messages. Anyways thanks :) – Yatin Gaikwad Feb 04 '19 at 13:54
1 Answers
1
There is no built-in way to forward messages from Azure IoT Hub to another generic MQTT broker. What you for example could do, is to write an small Azure Function that consumes the telemetry data from your IoT Hub and then write it to your MQTT broker.

silent
- 14,494
- 4
- 46
- 86
-
Thanks, until now I did it on localhost, but with your answer now I could do it on cloud . :) – Yatin Gaikwad Feb 04 '19 at 13:51
-
1One of my example projects (different context) contains an Azure Function which reacts on telemetry data from the IoT Hub. You can use that as a starting point: https://github.com/sebader/iotedge-end2end/blob/master/CloudFunctions/IotHubMessageProcessor.cs – silent Feb 04 '19 at 13:57