The use case of the custom IoT-Mule Adaptor/Connector is –
It connects the MQTT to Mule 4 and exposes sensor’s data to the client and allows the client to communicate back to the sensor by giving commands based on parameters. A custom connector is created to setup connection to the mosquito broker for exposing incoming sensor’s data from IoT device via a Topic i.e., esp/test and the client’s conditions are sent via another Topic i.e., mule/test back to the IoT device. This solution enables communication to-fro from the sensor to Mule and from Mule to sensor.
Figure 1: Below represents the inside package structure of IoT-Mule Adapter/connector.
The following steps involved in creation of connector are:
The connector’s code is shared in github.