Using an Android Tablet as an MQTT Server

I read something about the "messaging system" using the MQTT protocol. But I always read about the constellation: using Android as an MQTT-Client and an MQTT server that is not installed on an Android smartphone or other tablet (but as a stand-alone server).

Can I use one Android tablet as an MQTT server and some other Android tablets (e.g. 5 tablets) as MQTT clients?

And if possible, is it possible to use one Android tablet, which is an MQTT server, just like an MQTT-Client?

The connection between the Android-MQTT-Server-Tablet and other tablets like the MQTT-Client should work on a WIFI router / WIFI access point.

Thanks in advance for your help.

0
source share
2 answers

You can use tablets like mktt brokers (server) and mqtt clients. You will need to use the client library on all tablets and the broker on one of them.

Here is a clean java broker that I adapted for working on Android: https://github.com/interaktionsbyran/moquette Feel free to try!

+3
source

That's quite possible.

A hard bit will work on which tablet will become a broker. One approach would be to use avahi (mDNS) to try to open a broker if none are found, then set it up and advertise through avahi.

, Android, . Java , mosquitto, () Android , .

0

All Articles