试图找出 Azure 服务总线队列的主机名和端口

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

我需要能够 read/write 到 Azure 服务总线队列,为此,我的 IT 团队需要将主机名和端口列入白名单。

连接字符串为:"Endpoint=sb://[myappname].servicebus.windows.net;...".

我已经尝试使用端口 443 的主机名(这里假设),但是在列入白名单后没有用。所以现在我尝试写入队列,同时从 Wireshark 捕获流量,但我迷失了那里的所有网络数据包详细信息。

谁能帮我解决这个问题?

谢谢

TCP 端口默认用于传输操作。请尝试打开端口 56715672。我们可以从 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.

如果您使用库,请尝试将连接模式设置为 https(443 端口)

ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Https