Category: azure iot hub
PIYALI ROY on Wed, 22 Nov 2017 07:07:32
I need to have a continuous communication with the iot hub and my device (like in a 2 secs frequency).
So I'm expecting my data should go to iot hub events endpoint, stream analytics (with 2 outputs) will pick that up, put it in a Function App and an event hub.
My function App is going to process some data and push that back to my device feedback endpoint. And in my device I will be recieving this message.
As of now I have tried using the Microsoft.Azure.Devices.Client.PCL nuget package. Now this only supports Http. Now with http the issue im having is that http in IoThub is meant for infrequent calls (at 25 mins intervals approx). And since my app keeps making Http calls to the hub at an interval of 2secs, it reaches the throttling limit and all my devices stop recieving data.
I checked a few links like the one below:
But it seems to use an event hub instead of the iothub. I need to use my IoTHub and I dont have enough time to change my entire infrastructur on Azure.
Is there any other way I can get to do this?
PS: Its kind of urgent and my POC is almost ready except that when ever im running it for a long time, all is gone.
Michael Xu-MSFT on Thu, 23 Nov 2017 10:02:23
Currently, Microsoft.Azure.Devices.Client.PCL only supports HTTPS protocol, mqtt and amqp protocol are not supported. Please see here. In this blog, any complex message filtering is currently not supported. Extending this solution to be cross platform (using Android or iOS devices) also proves to be difficult, as AMPQNetLite is not compatible with Xamarin. Event Hubs and IoT Hub have many differences, which are detailed please look at Comparison of Azure IoT Hub and Azure Event Hubs.
I think you can use Azure Storage to store the processed data, and then your devices pull them from Azure Storage, please see Azure Storage on Xamarin.
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.