c# - 当消息在几天后进入服务总线队列时,Azure 函数不会被触发

标签 c# azure azure-functions azureservicebus azure-servicebus-queues

我在 azure 函数中观察到这个奇怪的问题,该问题是由服务总线队列消息触发的。

Azure 函数持续运行当服务总线队列收到新消息时触发

but when there is no message into queue for long time like suppose 1-2 days and when new message come into queue after 2 days ,Its strange that azure function does not get triggered , why any clue?

 public static class TestController
    {
        [FunctionName("TestController")]
        public static async Task Run([ServiceBusTrigger("%TestController.Topic%", "%TestController.Subscription%", AccessRights.Listen,
            Connection = "ConnServiceBus")]BrokeredMessage currentMessage, TraceWriter log, ExecutionContext context)
        {
            log.Info("TestControllerprocessing start " + DateTime.Now);

最佳答案

尝试通过点击“刷新”按钮强制重新同步触发器。对于在不确定的时间段内处于空闲状态的 Azure Functions,这是一个已知问题。另外,请验证您是否看到死信队列中的消息。

通过启用“始终开启”来防止您的 Azure Function 闲置:在 Azure 门户中打开您的 Function App。单击 Function App 边栏选项卡顶部的 Function App 设置。滚动到页面底部,然后单击“转到应用程序服务设置”。在“设置”边栏选项卡中,向下滚动并单击“应用程序设置”。在“应用程序设置”边栏选项卡中,确保“始终打开”设置已设置为“打开”。

关于c# - 当消息在几天后进入服务总线队列时,Azure 函数不会被触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52089883/

相关文章:

c# - GDI+ DrawImage 在 C++ (Win32) 中比在 C# (WinForms) 中慢得多

javascript - setTimeout 不起作用?

Azure powershell - 从资源属性中选择子属性

c# - 如何将 C# Linq 转换为 Vb.net

c# - 将 C# SHA1 代码转换为 Golang

azure - 托管磁盘和非托管磁盘之间的区别

c# - Azure SSO OnTokenValidated 不起作用

c# - 一个 eventhub 是否可以触发 2 个 azure 函数?

c# - log4net 从自定义 appender 访问上下文属性

Azure 函数未触发