You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Service Client Sample to Use Mqtt5 Client (#425)
* update service client to use mqtt5
* update ci and identity sample
* improve logs
* setup client id for mqtt5 client
* setup connectProperties
* more service client notes
* update readme
The service client with Mqtt5 client is almost identical to Mqtt3 one. The only difference is that you would need setup up a Mqtt5 Client and pass it to the service client.
327
+
For how to setup a Mqtt5 Client, please refer to [MQTT5 User Guide](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md) and [MQTT5 PubSub Sample](../pub_sub_mqtt5/README.md)
As the service client interface is unchanged for both Mqtt3 Connection and Mqtt5 Client,the service client will use mqtt.QoS instead of mqtt5.QoS even with a Mqtt5 Client.
Copy file name to clipboardExpand all lines: samples/node/jobs/README.md
+50
Original file line number
Diff line number
Diff line change
@@ -76,9 +76,59 @@ npm install
76
76
node dist/index --endpoint <endpoint> --cert <path to certificate> --key <path to private key> --thing_name <thing name>
77
77
```
78
78
79
+
You can also pass `--mqtt5` to run the sample with Mqtt5 Client
80
+
```sh
81
+
npm install
82
+
node dist/index --endpoint <endpoint> --cert <path to certificate> --key <path to private key> --thing_name <thing name> --mqtt5
83
+
```
84
+
79
85
You can also pass a Certificate Authority file (CA) if your certificate and key combination requires it:
80
86
81
87
```sh
82
88
npm install
83
89
node dist/index --endpoint <endpoint> --cert <path to certificate> --key <path to private key> --thing_name <thing name> --ca_file <path to root CA>
84
90
```
91
+
92
+
## Service Client Notes
93
+
### Differences between MQTT5 and MQTT311
94
+
The service client with Mqtt5 client is almost identical to Mqtt3 one. The only difference is that you would need setup up a Mqtt5 Client and pass it to the service client.
95
+
For how to setup a Mqtt5 Client, please refer to [MQTT5 User Guide](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md) and [MQTT5 PubSub Sample](../pub_sub_mqtt5/README.md)
As the service client interface is unchanged for both Mqtt3 Connection and Mqtt5 Client,the service client will use mqtt.QoS instead of mqtt5.QoS even with a Mqtt5 Client.
0 commit comments