Search code examples
wso2health-monitoringsiddhi

which event receiver adaptor should be used for android - siddhi application for simulating sensor based case scenario


I have a case scenario where health sensors are sending streams to siddhi-android, as I don't have real health sensors so I use an event simulator, now question is which input adaptor should I use for this scenario and why

Email Event Receiver
File-tail Event Receiver
HTTP Event Receiver
JMS Event Receiver
Kafka Event Receiver
MQTT Event Receiver
SOAP Event Receiver
WebSocket Event Receiver
WebSocket Local Event Receiver
WSO2Event Event Receiver

I am confused between MQTT and WebSocket 🤔

I think MQTT has something to do with IP changes that phone is going to make when it will connect and disconnect to network, then Mosquito broker will take care of that. On the other hand, I am not sure if WebSocket is the right choice. Also as I am using siddhi 4.0 I am not sure if I can use these extentions in android.

I have used tcp extension in android studio

implementation files ('libs/siddhi-io-tcp-2.0.13.jar');
annotationProcessor files ('libs/siddhi-io-tcp-2.0.13.jar')

but the annotations are not working

enter image description here

not sure if tcp is right choice either


Solution

  • For mobile devices, MQTT will be a better option as it can also handle connection failures effectively.

    You can do that with siddhi-io-mqtt[1] adopter.

    [1] https://wso2-extensions.github.io/siddhi-io-mqtt/