I need to process a task queue and I wonder if Azure Queue will work for my case. Task execution implies querying a rate-limited API and for that reason I want polling to happen every X seconds (can be slower, but must not be faster than that). Azure Function app would consume queue messages with concurrency of 1.
In the host.json settings maxPollingInterval
can be configured. For the minimum interval it says
Minimum is 00:00:00.100 (100 ms) and increments up to 00:01:00 (1 min)
Is there any way to force the required delay between polls?
The azure queue may not meet your need. Here is the polling algorithm:
So it does not poll the queue every X seconds.
You may consider using timer trigger function which can be specified to run at every X seconds; and inside the function, you can write your logic to call the api.