简体   繁体   English

如何测试QueueClient是否可以成功连接到Azure服务总线队列?

[英]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.

相关问题 Azure服务总线队列-当消息在队列中时,QueueClient.Receive()返回空的BrokeredMessage - Azure Service Bus Queue - QueueClient.Receive() returning null BrokeredMessage when messages are in the queue 在 C# 中,如何从 Azure 服务总线队列中获取所有消息? - In C#, How can I get ALL the messages out of an Azure Service Bus Queue? Windows Azure服务总线队列 - MessageSender或QueueClient? - Windows Azure Service Bus Queues - MessageSender or QueueClient? 调用QueueClient.CreateFromConnectionString时使用C#的Azure服务总线队列:BadImageFormatException - Azure Service bus Queue using C# : BadImageFormatException when calling QueueClient.CreateFromConnectionString 无法连接到Azure服务总线队列 - Failure to connect to Azure Service bus queue 如何使Azure Service Bus以FIFO方式工作? - How can I get Azure Service Bus to work in a FIFO manner? Azure 服务总线队列订阅如何影响 IIS 应用程序空闲 state? - How does Azure Service Bus queue subscription can affect in IIS application idle state? Azure服务总线队列 - Azure Service Bus Queue 取消长期运行接收的Azure Service Bus QueueClient? - Cancel an Azure Service Bus QueueClient long running Receive? 如何通过应用程序在 azure 的服务总线中创建队列 - How to create queue in service bus in azure by application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM