Need Help Tweaking FetchAndLock API Behavior in Camunda Spring Boot Starter

Hello,

Currently, the fetchAndLock API returns tasks for topics specified in the “topics” key.

{
    "workerId": "camunda-worker-1",
    "maxTasks": 2,
    "asyncResponseTimeout": 2000,
    "topics": [
        {
            "topicName": "topic-1",
            "lockDuration": 5000,
            "localVariables": false
        }
    ]
}

However, I have a large number of topics, and processing so many topics in the DB query becomes messy.

I would like to modify the behavior of the fetchAndLock API or create a custom one that allows me to specify the criteria for tasks without specifying individual topics. Here is an example of the desired request body:

{
    "workerId": "camunda-worker-1",
    "maxTasks": 2,
    "asyncResponseTimeout": 2000,
     "lockDuration": 5000,
     "localVariables": false
}

With this request, I expect to receive tasks from any topic that meet the specified criteria.

I am using the Camunda Spring Boot Starter for Camunda deployment. After reviewing the code, I found that there are many nested and interdependent classes, making it difficult to override or replicate the desired behavior easily.

While I can easily override the API controller and make changes at the service level, I am finding it challenging to tweak certain classes such as FetchExternalTasksCmd, FetchAndLockBuilderImpl, ExternalTaskQueryTopicBuilderImpl, and FetchAndLockHandlerImpl.

I would appreciate any help or suggestions on how to approach and solve this issue.

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