简体   繁体   English

使用 Azure 事件中心进行本地开发有哪些选项?

[英]What are the options for local development with Azure Event Hubs?

I am looking to start a new project using Azure Event Hubs.我希望使用 Azure 事件中心启动一个新项目。 Part of the project is a set of integration tests that can be run from any development machine (plus CI).该项目的一部分是一组可以从任何开发机器(加上 CI)运行的集成测试。 In the past, I've used the local emulators (eg, Cosmos DB, Storage, Service Fabric, etc.) for this purpose.过去,我曾为此目的使用过本地模拟器(例如,Cosmos DB、存储、Service Fabric 等)。 That way dev machines don't need real cloud credentials and have an isolated environment.这样,开发机器就不需要真正的云凭证并且拥有一个隔离的环境。 However, it appears that Event Hubs do not have a local emulator.但是,事件中心似乎没有本地模拟器。

Is there an Event Hubs emulator that I missed?是否有我错过的事件中心模拟器? If not, would a AMQP service be a good alternative?如果没有,AMQP 服务会是一个不错的选择吗? Are there any that would be decent approximation for Event Hubs?对于事件中心,是否有合适的近似值?

Thanks谢谢


I created a feedback item for this.我为此创建了一个反馈项。 Please vote it up if this would be useful to you!如果这对您有用,请投票!

https://feedback.azure.com/forums/34192--general-feedback/suggestions/31852534-provide-a-local-emulator-for-azure-event-hubs https://feedback.azure.com/forums/34192--general-feedback/suggestions/31852534-provide-a-local-emulator-for-azure-event-hubs

Azure Event Hubs does not have an emulator that can be installed locally. Azure 事件中心没有可以在本地安装的模拟器。 You'll need to create an Event Hubs instance in Azure and use that for development and testing purposes.您需要在 Azure 中创建一个事件中心实例,并将其用于开发和测试目的。

One option is to connect to the Kafka endpoint, and test your application as a Kafka application.一种选择是连接到 Kafka 端点,并将您的应用程序作为 Kafka 应用程序进行测试。

https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-for-kafka-ecosystem-overview https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-for-kafka-ecosystem-overview

It may not be elegant, but apparently there aren't many good options out there.它可能不优雅,但显然没有很多好的选择。 It will at least make it easier to migrate to Kafka later, if needed.如果需要,它至少会使以后更容易迁移到 Kafka。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM