简体   繁体   中英

Azure function is not get trigger when message comes into service bus queue after some days

I observed this strange issue with azure function which is triggered by a service bus queue message.

Azure function is continuous running which is trigger when service bus queue gets new message .

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);

Try force resyncing your triggers by hitting the Refresh button. This is a known issue for Azure Functions that are idle for a nondeterministic period of time. Also, verify if you're seeing the messages in the dead letter queue.

Prevent your Azure Function from going idle to begin by enabling "Always On": Open your Function App in the Azure portal. Click on Function App Settings at the top of the Function App blade. Scroll to the bottom of the page and click on Go to App Service Settings. In the Settings blade, scroll down and click on Application Settings. In the Application Settings blade, make sure that the Always On setting is set to On.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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