-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT connection without TLS #612
Comments
If you're not using TLS you can't use the builder interface for connection creation and instead need to directly use the types in the CRT. MQTT over plaintext just means you don't specify any TLS context. If you're using MQTT311, use the API that does not take a TLS context: https://github.com/awslabs/aws-crt-cpp/blob/main/include/aws/crt/mqtt/MqttClient.h#L616-L631 If you're using MQTT5, don't set any tls configuration when building the client configuration: https://github.com/awslabs/aws-crt-cpp/blob/main/include/aws/crt/mqtt/Mqtt5Client.h#L441-L448 |
Hi @bretambrose, Can you please share a sample code if you have any? That will be useful for my reference. |
There are no complete samples, but the integration tests in aws-crt-cpp show multiple examples: https://github.com/awslabs/aws-crt-cpp/blob/main/tests/MqttClientTest.cpp |
Hi @bretambrose, Does this has any examples to connect to the broker using JWT? |
No. There is no support for anything JWT related. |
This issue appears to be resolved. Please feel free to comment and reopen if there are any further questions. Please open a new discussion or issue if further questions do not have to do with MQTT connection without TLS. |
|
Describe the feature
I am looking for a sample code to connect to MQTT broker without TLS, Similar to plaintext sample code in aws-iot-device-sdk-embedded-C and a command line if any to connect to the broker.
Use Case
In our project, we need to support both TLS and non TLS connections.
Proposed Solution
No response
Other Information
No response
Acknowledgements
SDK version used
v1.27.0
Environment details (OS name and version, etc.)
Linux
The text was updated successfully, but these errors were encountered: