Skip to content

Commit 9a26095

Browse files
Change from mqtt to amqp (#41)
1 parent a25e023 commit 9a26095

File tree

1 file changed

+2
-3
lines changed
  • content/dotnet-template-azure-iot-edge-module/CSharp

1 file changed

+2
-3
lines changed

content/dotnet-template-azure-iot-edge-module/CSharp/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace SampleModule
99
using System.Threading;
1010
using System.Threading.Tasks;
1111
using Microsoft.Azure.Devices.Client;
12-
using Microsoft.Azure.Devices.Client.Transport.Mqtt;
1312

1413
class Program
1514
{
@@ -42,8 +41,8 @@ public static Task WhenCancelled(CancellationToken cancellationToken)
4241
/// </summary>
4342
static async Task Init()
4443
{
45-
MqttTransportSettings mqttSetting = new MqttTransportSettings(TransportType.Mqtt_Tcp_Only);
46-
ITransportSettings[] settings = { mqttSetting };
44+
AmqpTransportSettings amqpSetting = new AmqpTransportSettings(TransportType.Amqp_Tcp_Only);
45+
ITransportSettings[] settings = { amqpSetting };
4746

4847
// Open a connection to the Edge runtime
4948
ModuleClient ioTHubModuleClient = await ModuleClient.CreateFromEnvironmentAsync(settings);

0 commit comments

Comments
 (0)