Understand the difference between MqttAsyncClient and MqttClient
masterThe Paho Java Client provides two distinct API styles:
- MqttAsyncClient: A fully asynchronous API where the completion of activities (like connecting or publishing) is notified via registered callbacks.
- MqttClient: A synchronous wrapper around
MqttAsyncClient. It provides a simpler programming model where functions appear to block until the operation is complete, making it easier to use for simple synchronous applications.