-
I am testing MQTT protocol I don't have any credentials I only have to broker url and clientId. How do I connect to it using java code? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You cannot connect to AWS IoT without credentials. https://docs.aws.amazon.com/iot/latest/developerguide/iot-connect-devices.html |
Beta Was this translation helpful? Give feedback.
-
Mike is correct with respect to AWS IoT Core. However if you wish to test against a local broker that does not require authentication, you can do so by creating the client directly rather than using the builder class (which does lots of IoT Core specific set up for you). If you're using MQTT5 you can use the CRT MQTT5 tests as a model (most of the parameters set there are not needed for basic testing purposes). If you're using MQTT311 you can use the raw connect sample as a starting point (however, you probably wouldn't be using TLS and so you'd use the MqttClient constructor variant that takes nothing). |
Beta Was this translation helpful? Give feedback.
Can you try port 443?
As noted on this webpage the default for wss is 443