Skip to content

Commit c06ca87

Browse files
committed
set the transport type to AmqpWebSockets
1 parent 6adaa42 commit c06ca87

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

articles/service-bus-messaging/service-bus-dotnet-get-started-with-queues.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ This section shows you how to create a .NET Core console application to send mes
115115
// of the application, which is best practice when messages are being published or read
116116
// regularly.
117117
//
118-
// Create the clients that we'll use for sending and processing messages.
119-
client = new ServiceBusClient(connectionString);
118+
// set the transport type to AmqpWebSockets so that the ServiceBusClient uses the port 443.
119+
// If you use the default AmqpTcp, you will need to make sure that the ports 5671 and 5672 are open
120+
121+
var clientOptions = new ServiceBusClientOptions() { TransportType = ServiceBusTransportType.AmqpWebSockets };
122+
client = new ServiceBusClient(connectionString, clientOptions);
120123
sender = client.CreateSender(queueName);
121124
122125
// create a batch

0 commit comments

Comments
 (0)