Can MQTT be used as a channel between an App and a server?

36 views
Skip to first unread message

Amr

unread,
Jul 15, 2017, 5:55:13 AM7/15/17
to MQTT
we have Android App and two servers namely, server_s and server_w.

1- server_s sends jobs to server_w "one job at a time",
2- server_w forward this job to the App and waits response from the App. that response could be something like "job received and accepted or job received and rejected).
3- when the App sends the respons to server_w, then server_w communicate with server_s and tell him please send me another job
4- go to step 2 again

the problem is, at any given time the user of the App can disconnect from the server and server_s can still send jobs.

to solve this issue, we are thinking of using MQTT. in such way that the broker can be installed on server_w and the App can PUBLISH a message containing its current connectivity state
and server_s can SUBSCRIBE to the same topic.

Our concern or the point which is obsecure to us is, we know that MQTT is to connect two devices, however regarding our situation the first device is the App.Can server_s be the second
end/device? is it possible that MQTT can works as a channel between an App and a server??

Please advice and I open to any suggestions and opinions

Reply all
Reply to author
Forward
0 new messages