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 Mqtt5 Library with Latest API changes (#568)
* latest mqtt5client update
* update userguide with new API and changes
* update doc
* improve error handling
* update the error handling
* update doc
* update aws-crt-cpp to v0.20
* clang-format
* update API changes for mqtt5 shared subscription sample
* update user guide with latest api
/* You can setup other client options and lifecycle event callbacks before call builder->Build().
509
528
** Once the the client get built, you could no longer update the client options or connection options
@@ -548,9 +567,9 @@ The Subscribe operation takes a description of the SUBSCRIBE packet you wish to
548
567
subscriptionList.push_back(data2);
549
568
subscriptionList.push_back(data3);
550
569
551
-
// Creaet a SubscribePacket with the subscription list. You can also use packet->withSubscription(subscription) to push_back a single subscription data.
570
+
// Creaet a SubscribePacket with the subscription list. You can also use packet->WithSubscription(subscription) to push_back a single subscription data.
fprintf(stdout, "Publish failed with error_code: %d", result->getErrorCode());
@@ -650,3 +669,4 @@ Below are some best practices for the MQTT5 client that are recommended to follo
650
669
* If you are getting unexpected disconnects when trying to connect to AWS IoT Core, make sure to check your IoT Core Thing’s policy and permissions to make sure your device is has the permissions it needs to connect!
651
670
* For **Publish**, **Subscribe**, and **Unsubscribe**, you can check the reason codes in the CompletionCallbacks to see if the operation actually succeeded.
652
671
* You MUST NOT perform blocking operations on any callback, or you will cause a deadlock. For example: in the on_publish_received callback, do not send a publish, and then wait for the future to complete within the callback. The Client cannot do work until your callback returns, so the thread will be stuck.
672
+
* You can use `LastError()` and `ErrorDebugString(error_code)` to get the error code and error message.
0 commit comments