Search code examples
wiresharkazureservicebusazure-servicebus-queues

Trying to figure out hostname and port for Azure Service Bus Queue


I need to be able to read/write to an Azure Service Bus Queue and for that, the hostname and ports need to be white-listed by my IT team.

The connection string is: "Endpoint=sb://[myappname].servicebus.windows.net;...".

I have tried the hostname with port 443 (assuming here), but that hasn't worked after white-listing. So now I tried writing to queue while capturing the traffic from Wireshark, but I am getting lost in all the network packet details there.

Can anyone please help me with this?

Thank you


Solution

  • TCP port is used by default for transport operations. Please have a try to open the port 5671 and 5672. We could get more information from AMQP 1.0 in Azure Service Bus and Event Hubs protocol guide.

    Azure Service Bus requires the use of TLS at all times. It supports connections over TCP port 5671, whereby the TCP connection is first overlaid with TLS before entering the AMQP protocol handshake, and also supports connections over TCP port 5672 whereby the server immediately offers a mandatory upgrade of connection to TLS using the AMQP-prescribed model. The AMQP WebSockets binding creates a tunnel over TCP port 443 that is then equivalent to AMQP 5671 connections.

    If you use a library, please have a try to set the ConnectivityMode to https (443 port)

    ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Https