简体   繁体   English

如何像 Azure 函数一样通过 Azure 存储队列触发控制器操作?

[英]How to trigger controller action by Azure storage queue like in Azure functions?

I am aware that an Azure function app offers a variety of ways its functions can be triggered.我知道 Azure 函数应用提供了多种触发其函数的方式。 Among this is a the Azure storage queue trigger.其中有一个 Azure 存储队列触发器。

I need to use this exact method in my on-premise .NET Core 3.1 Web API project, which until now is exclusively triggered by http requests.我需要在我的内部部署 .NET Core 3.1 Web API 项目中使用这个确切的方法,直到现在它完全由 http 请求触发。

Can this be done?这能做到吗?

Cheers干杯

While I haven't really tried this out before, I believe you should be able to run the Azure Functions Host locally similar to how it runs inside its docker container .虽然我之前没有真正尝试过,但我相信您应该能够在本地运行Azure Functions Host ,类似于它在docker 容器中的运行方式。

Another option would be to use the WebJobs SDK (on top of which Azure Functions is built) which you should be able to use (along with all available functions bindings) to create a standalone service that you can run on-premise.另一种选择是使用WebJobs SDK (在其上构建 Azure Functions),您应该能够使用它(以及所有可用的函数绑定)来创建可以在本地运行的独立服务。

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

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