Support Questions
Find answers, ask questions, and share your expertise

MQTT subscription input data timeout detection

MQTT subscription input data timeout detection

New Contributor


I am experimenting with a battery powered IOT sensor which periodically sends JSON data via MQTT to Mosquitto. I have Nifi setup with "consumeMQTT" to harvest this data, make a decision and post an output. It all works as planned.

However I recognise the possibility that the sensor battery could fail, upon which the periodic messages will stop. I have experimented with this I have determined that no new FlowFile is created by "consumeMQTT", which is reasonable enough.

The issue I have is that this "open loop" condition has to be detected and handled to place the process in a safe state. I was half expecting to find an output for no data received, or an attribute of the same meaning being sent in FlowFile.

Can anyone point me to an example system design where such a scenario is handled? I'm sure there must be a way.

Many thanks,