What Does ProvisioningTransportHandler Do

mikefinch87 115 Reputation points
2024-07-18T21:08:52.19+00:00

When using the Device provisioning service with Azure a client is created with

var provClient = ProvisioningDeviceClient.Create(_global_provisioning_endpoint, dpsScope, security, transportHandler);

There are 3 choices for transport handler, why would I use one over the other, when DPS is only accessible through global.azure-devices-provisioning.net on port 443.

Microsoft.Azure.Devices.Provisioning.Client.Transport.ProvisioningTransportHandlerAmqp

Microsoft.Azure.Devices.Provisioning.Client.Transport.ProvisioningTransportHandlerHttp

Microsoft.Azure.Devices.Provisioning.Client.Transport.ProvisioningTransportHandlerMqtt

Since the setting does not have to match the one used when creating the Device Client, and the commissioning payload is not large?

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
397 questions
Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
216 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,802 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2024-07-18T21:08:52.2266667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The ProvisioningTransportHandler is responsible for handling the communication between the device and the Device Provisioning Service. The three transport handlers available are ProvisioningTransportHandlerAmqp, ProvisioningTransportHandlerHttp, and ProvisioningTransportHandlerMqtt. The choice of transport handler depends on the specific requirements of the scenario. For example, if the scenario requires a lightweight protocol with low overhead, MQTT may be a good choice. If the scenario requires a protocol that is more reliable and can handle larger payloads, HTTP may be a better choice. The transport handler used when creating the device client does not have to match the one used when creating the provisioning client.

    References:


    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.