Azure-iot-sdk-c: DeviceClient or Client interface to use

Created on 6 Mar 2019  路  5Comments  路  Source: Azure/azure-iot-sdk-c

  • OS and version used: uClinux (kernel version: 2.33.6)

  • SDK version used: lts_10_2018

Description of the issue:

We have a project that is based on the Client interface (from the iothub_client_ll.h). Right now we are considering to switch from plain messages to Direct (Device) methods and I noticed that in the most recent releases all samples had been migrated to the DeviceClient interface (from the iothub_device_client_ll.h). And here is my questions:

  • are there plans to deprecate Client interface in next releases?
  • should we consider migration from the Client interface to DeviceClient interface?
  • are there any differences on how Direct methods are working with the Client and DeviceClient interface?

Thank you.

question

All 5 comments

Hi @vpetrigo ,

thanks for your questions. Here are the answers:

  • are there plans to deprecate Client interface in next releases?
    > Yes, the iothub_client.h API shall not be used for new developments. iothub_device_client.h shall be used instead. We haven't fully announced it yet, but as you can see in samples it hasn't been used anymore. Also new features are not being exposed on iothub_client.h anymore.
  • should we consider migration from the Client interface to DeviceClient interface?
    > We would advise to use iothub_device_client.h instead of iothub_client, yes.
  • are there any differences on how Direct methods are working with the Client and DeviceClient interface?
    > In reality, no. Underneath the functionality is still the same. The change from iothub_client to iothub_device_client was mainly because of naming.

We will update documentation soon about this change.

Hey @ewertons,

Thank you for prompt response. So, am I right that there are no rush right now regarding migration from the Client to DeviceClient interface and we may keep using it for a while? The migration is only necessary if there are new features in the feature we want to use, is not it?

Thank you.

Absolutely, yes you can still use it.
We have a discussion going on about how to mark the (iothub_client.h) API deprecation.
Whenever we do it, it will be clear on the header file, and we won't deprecate right away (probably we will keep it until we have a major version uptick, which is not planned for anytime soon).
And you are correct, as soon as you only need features that are already implemented in iothub_client.h, you can still use it. We have gated builds to guarantee new features won't break the existing API surface.

Thank you for the comprehensive explanation!

@ewertons, @vpetrigo, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey

Was this page helpful?
0 / 5 - 0 ratings