Fetch And Lock long polling


I noticed an issue in the Fetch And lock endpoint for external tasks. It does not appear to be honoring the maxTasks property and is returning immediately if there are any available external task for the topic.

If there are no external task then it will wait until the asyncResponseTimeout, but if you trigger an external task ( I did this by creating a process) then it will immediately return that single external task.

Here is my json payload below that I’m using.

    "workerId": "test",
    "maxTasks": 2000,
    "asyncResponseTimeout": 10000,
    "topics": [
            "topicName": "test-topic",
            "lockDuration": "5000"

Hi @Frankwayne,

maxTasks specifies the maximum number of tasks that can be fetched within one request so if more tasks are available then multiple calls are required.

Only asyncResponseTimeout has control over how long it should wait before returning a response if and only if no tasks are available so if any is available then response is supposed to be returned immediately.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.