Open kushagrakumar27 opened 2 weeks ago
Hi @kushagrakumar27. For IoT we strongly recommend you switch to the AWS IoT Device SDK for Java v2 - that library is very actively maintained and you will be able to get better support there. They have documentation about using that library on Android.
In terms of this specific exception, it's coming from the underlying Paho Client. There's not a lot of visibility into what is going wrong, but it seems that this error can result from issues authenticating the connection.
Hi @mattcreaser. Thanks for the library suggestion.
Does com.amazonaws:aws-android-sdk-iot
support only MQTT over secure websockets
as the Application protocol, or does it also support Secure MQTT
(that uses TLS)?
Hi @kushagrakumar27. I have pretty limited knowledge of this library, but I believe the answer is "both", but in your case it would probably only be websocket.
Looking at the source code, when connecting with a KeyStore
instance, we can see that the client connects via TLS on port 8883 (Secure MQTT) or 443.
When connecting via a custom authorizer it looks like it uses secure websockets.
Language: Kotlin
Gradle dependencies:
Description:
I am using Custom authorizer to establish connection to MQTT broker (configured on AWS IoT domain). The domain is configured as follows:
I have attached the
MQTT_log_exception
file which contains theIOException
that I am getting. MQTT_log_exception.txt