yuvi
yuvi

Reputation: 79

How to deploy Moquette broker in Android?

Can we deploy a Moquette/Mosquitto broker inside Android for MQTT client communication?

I want to deploy a Moquette/Mosquitto broker inside Android and one MQTT client will communicate to another using that broker.

Upvotes: 5

Views: 2657

Answers (2)

William Kinaan
William Kinaan

Reputation: 28809

Theoretical speaking, yes you can because Moquette is a java based broker, and Android uses java SDK, but practically, that should not ever be made.

You would need a mqtt client, which in your case, a Java client, such as paho client, and the broker should be running on a real server

Upvotes: 2

Teixi
Teixi

Reputation: 1097

There must exist a major reason to have a Broker embedded in a mobile client an not in a server.

The rationale is that you have the broker running in a server, then several mobile clients exchange messages by publishing and subscribing to specific topics in the server broker.

For that reason mobile clients should implement MQTT clients such as Paho Android Service: https://eclipse.org/paho/clients/android/

Upvotes: 1

Related Questions