Azure 服务总线 - Java 应用程序的集成测试方法

Azure Service Bus - Integration testing approach for a Java app

您对使用 Azure 服务总线进行消息传递的 Java 应用程序进行集成测试的方法是什么?

我不想在每个 CI 构建中都使用云服务。更愿意生成一个嵌入式版本的 Azure 服务总线或以某种方式模拟它。或者,我正在考虑编码 AMQP/JMS 并在 CI 构建期间使用嵌入式 ActiveMQ 来模拟 Azure 服务总线。 谢谢

根据您的描述,听起来您想使用本地兼容的替代方案而不是 Azure 服务总线来与本地 CI 的 Java 应用集成。

据我所知,之前有一个名为 Windows Service Bus 的替代方案,正如页面 About Windows Service Bus 所述。

Windows Service Bus (WSB) can be thought of as an on-premises version of Azure Service Bus.

但正如 SO 线程 said. And there is no Service Bus emulator like the SO threads and Test Azure Service Bus locally without any subscription or login(由 MSFT 回答)所说,它正式死亡。

考虑到 Azure Service Bus limits 并根据我的经验,我不确定是否有替代软件可以代替它而不会出现兼容性问题,因此使用云服务进行 CI 构建是必要时唯一的选择。

如果您不必使用 Azure Server Bus 进行消息传递,Azure Storage Queue 是与您的 Java 应用程序集成的不错选择,您可以参考官方文档 Use the Azure storage emulator for development and testing下载模拟器并使用它。