[英]How can I test if QueueClient can successfully connect to an Azure Service Bus Queue?
I'm using the Microsoft.Azure.ServiceBus.QueueClient to connect to a known good queue that I've setup in Azure Service Bus using the connection string format sb://xxxxx.servicebus.windows.net/ 我正在使用Microsoft.Azure.ServiceBus.QueueClient连接到我使用连接字符串格式在Azure Service Bus中设置的已知良好队列sb://xxxxx.servicebus.windows.net/
But, our draconian firewall/acl rules apply even to DEV and TEST machines. 但是,我们严格的防火墙/ acl规则甚至适用于DEV和TEST机器。
Is there a way that I can run a test in the code to see if the Client was able to successfully connect to the Endpoint? 有没有办法在代码中运行测试以查看客户端是否能够成功连接到端点?
使用Azure功能,您可以向Service Bus发送消息/电子邮件警报,以了解QueueClient是否可以成功连接
You can run your code outside of your firewall so that the connection will be allowed. 您可以在防火墙外部运行代码,以便允许连接。
For instance, if you have a web app, you can simply host it in an App Service plan and see if the connection is successful. 例如,如果您有一个Web应用程序,则只需将其托管在App Service计划中,然后查看连接是否成功。 You also could stand up a VM, host it in an Azure Function, Service Fabric, Cloud Services, etc.
您还可以站起来,在Azure功能,服务架构,云服务等中托管它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.