Trigger cloud function based on events in MQTT topics
In my application I want to get a notification whenever a device connects / disconnects from the IoT platform and take some action based on the event. As per link (https://console.bluemix.net/docs/services/IoT/reference/security/client_connect.html#connect_status?cm_sp=dw-bluemix-_-nospace-_-answers) and link (https://console.bluemix.net/docs/services/IoT/applications/mqtt.html#subscribe_device_commands?cm_sp=dw-bluemix-_-nospace-_-answers) , the connectivity status (whether a device is connected / disconnected) will be published to the MQTT topic of iot-2/type/device_type/id/device_id/mon
One option is to have a service running 24x7 subscribed to this topic and take appropriate actions. Since in my use-case, number of such events is low, using a cloud function seems to be a cost effective approach. It would be good to have an option to set rules by which cloud function gets triggered based on events in any MQTT topic of IoT platform.
Alternate mechanism is: Similar to the way telemetry events can be routed to Message Hub, monitoring events could also be redirected to Message Hub. Cloud functions is already integrated with Message Hub, so this will complete the flow
NOTICE TO EU RESIDENTS: per EU Data Protection Policy, if you wish to remove your personal information from the IBM ideas portal, please login to the ideas portal using your previously registered information then change your email to "firstname.lastname@example.org" and first name to "anonymous" and last name to "anonymous". This will ensure that IBM will not send any emails to you about all idea submissions