Skip to content

How to use MqttClientConnection without Websockets?

0

The class "MqttClientConnection" in the AWS Java SDK leaks UDP sockets. I posted about this yesterday but have not yet received a response or found a solution.

I'd like to try using it without Websockets. The builder (AwsIotMqttConnectionBuilder.newDefaultBuilder()) has a "withWebsockets(boolean)" option. I can set this to False, however, my credentials are being provided by "withWebsocketCredentialsProvider" and "withWebsocketSigningRegion" and there are no equivalent methods for non-websocket connections.

How do I provide my credentials if I don't want to use Websockets?

asked 2 years ago284 views
1 Answer
0

maybe use 'withCredentialsProvider' method that accepts an AwsCredentialsProvider object. You can use this method to provide your credentials regardless of the connection type.

Or maybe you can use the withCustomCredentials method to provide custom credentials directly. This approach is useful if you have credentials retrieved from a different source or need more control over the credential details.

Havn't tried these two myself in any codeset yet . Please try once and share feedback.

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.