I'm having quite a strange issue with my Azure IoT Hub and Azure Stream Analytics job.
Long story short: I configured an Azure IoT Hub instance to get some weather data from a Raspberry PI 3 which had a sensor attached to it; then, I configured an Azure Stream Analytics job to take the data from the IoT hub and put it into a DocumentDB collection - during the configuration phase, I set the sensorId as being the partition key. After running the job for almost 3 days, I bought some more sensors (that have different IDs) and add them to the Raspberry PI - the data is being collected and sent to the Azure IoT Hub without any issues for all 3 attached sensors (checked the transmission with the Device Explorer).
Now comes the weird part - only the data sent by first sensor (the one which run for almost 3 days by itself) is getting through the Analytics job and sent to DocumentDB - in the portal I see that I have a lot of Input events but I see 0 Output events (though data is getting through).
In order to exclude any other issues, I wrote a small console application that "listens" to the IoT hub for the incoming messages and indeed, all sensors are sending data to the IoT hub.
The query used for the analytics job is the following:
SELECT
sensorId,
avg(humidity) as avghumidity,
avg(temperatureFromHumidity) as avgtemperatureFromHumidity,
avg(objectTemperature) as avgobjectTemperature,
avg(temperatureFromIr) as avgtemperatureFromIr,
avg(pressure) as avgpressure,
avg(lux) as avglux,
System.TimeStamp AS executionTime
INTO
[XXX-document-db]
FROM
[home-meteo] TIMESTAMP BY currentTime
GROUP BY
sensorId,
TumblingWindow(second, 30)
I've seen other issues somehow similar but the accepted answer was that there was a bug at Microsoft.
There is any way on how to debug this thing?
Thank you.