Skip navigation links

Package org.eclipse.paho.client.mqttv3

Contains a programming interface enabling applications to communicate with an MQTT server.

See: Description

Package org.eclipse.paho.client.mqttv3 Description

Contains a programming interface enabling applications to communicate with an MQTT server.

The MQ Telemetry Transport (MQTT) is a lightweight broker-based publish/subscribe messaging protocol designed to be open, simple, lightweight and easy to implement. These characteristics make it ideal for use in constrained environments, for example, but not limited to:

Features of the protocol include:

The basic means of operating the client is:

  1. Create an instance of MqttClient or MqttAsyncClient, providing the address of an MQTT server and a unique client identifier.
  2. connect to the server
  3. Exchange messages with the server:
    • publish messages to the server specifying a topic as the destination on the server
    • subscribe to one more topics. The server will send any messages it receives on those topics to the client. The client will be informed when a message arrives via a callback
  4. disconnect from the server.

The programming model and concepts like the protocol are small and easy to use. Key concepts to use when creating MQTT application include:

Skip navigation links