-
Feature Request
-
Resolution: Won't Fix
-
L3 - Default
-
None
-
None
It is currently possible to implement a long polling external task worker using the low-level java API (See code example in CAM-10256)
The idea of this FR is to provide a slightly more high-level API along the lines of
List<LockedExternalTask> externalTasks = externalTaskService.fetchAndLock(500, "worker-id") .topic("topic-name", 60 * 5 * 1000) .executeWithTimeout(5000); // blocks for at most 5 seconds if no tasks are immediately available, returns earlier if tasks become available during timeout
Under the covers this would use the Condition primitives to block if no tasks are immediately available.