Skip to content

Releases: Azure/azure-iot-sdk-node

Azure IoT SDKs for Node.js v1.2.0 (Device) and v1.1.18 (Service)

25 Oct 02:43
Compare
Choose a tag to compare

New Feature: Device SDK automatic and custom retries

A large proportion of issues reported with the device SDK are connectivity issues. with this in mind we set out a few months ago to rewrite the transports layers to be more stable and introduced code that enabled better state and error management for each protocol - in this release, we were finally able to remove the over-arching client state machine that had become useless and was causing issues. We have now introduced per-operation retries on top of that.

This means that when a user calls any of the device client API (subscribe to receive C2D messages, send telemetry, etc) the client doesn't have to know what the transport should do: just ask the transport to do it and report. the transport can then bubble up either a success result or an error. It's then up to the client to ask the transport to retry or send the error back to the user.

By default, the client will retry using "an exponential backoff with jitter" strategy, for up to 4 minutes. This is done without any changes to the API surface. your code will automatically benefit from this.

It is possible for a user to disable retries alltogether, or to define a custom retry logic and feed this to the client using the Client.setRetryPolicy() API.

For example:

var Client = require('azure-iot-device').Client;
var Amqp = require('azure-iot-device').Amqp;
var NoRetry = require('azure-iot-common').NoRetry;

var client = Client.fromConnectionString('<connectionString>', Amqp);
// Disable Retries
client.setRetryPolicy(new NoRetry());

// Custom retry policy
var myRetryPolicy = {
  shouldRetry: function (err) { 
    // decide depending on err if you would like to retry or not - should return true or false.
  },
  nextRetryTimeout: function (retryCount, throttled) {
    // should return an integer that is the number of milliseconds to wait before the next retry
    // based on the current count of retries (retryCount) 
    // and if the IoT Hub is asking clients to throttle their calls (throttled, boolean)
  }
}

client.setRetryPolicy(myRetryPolicy);

caveat
There are a few issues that this won't solve and that we will tackle next:

  • There are a few errors coming from the MQTT library that we are not catching because they are thrown before we can attach an event handler on the error event - we are looking for ways to circumvent this
  • The Twin feature requires heavy refactoring to support a fully-fledged retry logic - right now twin operations are not being retried automatically.

External Contributions:

  • #118 Added Twin type to azure-iothub exports. Thanks @nebrius !!

Azure IoT SDKs for Node.js v1.1.19 (Device) and v1.1.17 (Service)

09 Oct 21:20
Compare
Choose a tag to compare

This release includes upgrades to the inner workings of the transport packages (AMQP, MQTT and HTTP) to prepare for the introduction of retries in what will be the SDK version 1.2.0

  • Introduction of state machines and connection state management in all transports
  • Remove the receiver objects where pertinent and have a more consistent client experience across transports
  • Moving some objects around (especially RestApiClient) so that more code can be shared between packages.

No API or behavioral changes should be apparent yet (except maybe more stable/more consistent connections)

Azure IoT SDKs for Node.js v1.1.18 (Device) and v1.1.16 (Service)

23 Sep 00:48
Compare
Choose a tag to compare

All the changes in this release are internal refactoring, as we get ready to introduce the much awaited retry logic.

Azure IoT Hub Service SDK v1.1.15

25 Aug 22:51
Compare
Choose a tag to compare

Fix for #76 - Fix Content-Length on UTF-8 2 bytes characters. Special thanks to @Kaaml for this!

Azure IoT SDKs for Node.js v1.1.17 (Device) and v1.1.14 (Service)

05 Aug 00:19
Compare
Choose a tag to compare

Bugs fixed

  • #49 (protobuf support)
  • #60 (putToken causing crash when renewing the shared access signature)

PR accepted

Improvements

  • Support for CA signed certs with MQTT
  • Support for Twin operations over AMQP

Azure IoT SDKs for Node.js v1.1.16 (Device) and v1.1.13 (Service)

14 Jul 20:53
Compare
Choose a tag to compare
  • Updates to the LTS documentation
  • Fixes to whitespace for typescript
  • Fixes a typo in a variable name for the results interface

Azure IoT SDKs for Node.js v1.1.15 (Device)

30 Jun 19:20
Compare
Choose a tag to compare
  • Allow slashes in the blob name for file uploads
  • Added information about end to end testing to the documentation
  • Updated the documentation for the SDK development environment

Azure IoT SDKs for Node.js v1.1.14 (Device)

02 Jun 22:12
Compare
Choose a tag to compare
  • Update end to end test error handling
  • Enable throttling tests and improve their speed
  • Improve detection of link, session and connection failure in AMQP transport

Azure IoT SDKs for Node.js v1.1.13 (Device)

24 May 02:07
Compare
Choose a tag to compare
  • Fix #43
  • Better handling of some AMQP errors associated with session and link failures

Azure IoT SDKs for Node.js v1.1.12 (Device) and v1.1.11 (Service)

19 May 00:34
Compare
Choose a tag to compare
  • Fix for #39
  • Fix for #41 (and potentially #40 (to be confirmed))
  • Additional handling of AMQP protocol errors