azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Function continue to process even after host has stopped due to timeout, leaves item in the queue and results in duplicate processing of same message

Open nitish28 opened this issue 3 years ago • 2 comments

Function sample code: for (var i = 0; i < 4; i++) { log.Info($"Next visible {i} : {myQueueItem}"); await Task.Delay(1000); }

Host.json settings: { "queues": { "maxPollingInterval": 1000, "visibilityTimeout": "00:00:10", "batchSize": 4, "maxDequeueCount": 5, "newBatchThreshold": 2 }, "functionTimeout": "00:00:02" }

Message re-appears in the queue after 10 minutes, However in setting visibility timeout is: 10 seconds. image

Output: image

Question: Why is it still processing the message once the host has stopped? If we look at the workflow, it has completed the queue message processing but it leaves the message in the queue which causes the duplicate processing of the same message.

nitish28 avatar Oct 02 '22 22:10 nitish28

@nitish28 Please check the below SO for duplicate processing of same message. https://stackoverflow.com/questions/50168173/azure-function-app-processing-same-message-2-times

If you still face the issue, please provide us the functiona app name, timestamp and invocation id details so that we can check for the logs in our system and update you further.

ramya894 avatar Oct 10 '22 10:10 ramya894

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

ghost avatar Oct 14 '22 13:10 ghost