C# Azure Function trigger when SQL Database has a new row added without polling(当 SQL 数据库添加新行而不进行轮询时,C# Azure 函数触发器)
问题描述
有没有办法在每次将新的数据库行添加到 SQL azure 数据库时调用 Azure 函数?理想情况下没有任何基于计时器的轮询.我知道这可以在 blob 存储上完成,但在 Azure 函数上看不到这样做的方法.
Is there a way for an Azure function to be called every time a new database row is added to an SQL azure database ? Ideally without any timer based polling. I know this can be done on blob storage but dont see a way to do this on Azure function.
提前致谢
推荐答案
这是可能的,但现在是实验性的.我在这个答案的末尾有一个指南,你会发现它非常简单.但同样,这是实验性的,不要指望它一直都能正常工作.
It is possible but it's experimental right now. There's a guide that I'm putting at the end of this answer and you'll see that it's pretty straight forward. But again, this is experimental and don't expect that it works well all the time.
另一个选项将在您拥有的代码中插入一条记录以向服务总线队列发送消息,然后您可以将其用作函数的触发器(使用服务总线,您还可以配置死信等待重试).
Another option will be in the code you have that insert a record to also send a message to queue o service bus and you can then make use of that as a trigger to your function (with service bus you also configure a dead letter queue for retries).
参考:https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-external-table
这篇关于当 SQL 数据库添加新行而不进行轮询时,C# Azure 函数触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:当 SQL 数据库添加新行而不进行轮询时,C# Azure 函数触发器
基础教程推荐
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 如果条件可以为空 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 从 C# 控制相机设备 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 将数据集转换为列表 2022-01-01
