Package app.ductape.sdk.jobs
Class RedissonJobQueueAdapter
java.lang.Object
app.ductape.sdk.jobs.RedissonJobQueueAdapter
- All Implemented Interfaces:
JobsService.JobQueueAdapter
Redisson-native queue adapter that mirrors the queue touchpoints used by TS
JobsService
(which is BullMQ-backed in TS). Java is Redisson-native by design — this adapter does not
speak the BullMQ wire protocol; it provides equivalent functional semantics on top of Redisson
primitives (RScoredSortedSet, RMap, distributed locks).
Touchpoints kept aligned with TS callers:
add(type, input, options)—repeat.every/repeat.cronsupported withrepeat.limit/repeat.endDateguards (recurrence reschedules onack).get/removebyjobId.removeRepeatableByKey(repeatableKey).claimDueJobsWithLock/ack/fail— worker-token leasing for theDuctape.monitor()loop, with stale-lock reclamation (functional equivalent of BullMQ stalled-job recovery).
Retry/backoff is owned by TS job-state logic in ProcessorService/JobsService,
not by this adapter — the fail path here only reschedules recurring jobs and re-leases
stalled work, never silently increments attempts.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRedissonJobQueueAdapter(org.redisson.api.RedissonClient redisson, String workspaceId) RedissonJobQueueAdapter(org.redisson.api.RedissonClient redisson, String workspaceId, String queueName) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclaimDueJobs(int limit) claimDueJobsWithLock(int limit, long lockMs) voidvoidvoidremoveRepeatableByKey(String repeatableKey)
-
Constructor Details
-
RedissonJobQueueAdapter
-
RedissonJobQueueAdapter
-
-
Method Details
-
add
- Specified by:
addin interfaceJobsService.JobQueueAdapter
-
remove
- Specified by:
removein interfaceJobsService.JobQueueAdapter
-
claimDueJobs
-
claimDueJobsWithLock
-
ack
-
fail
-
removeRepeatableByKey
- Specified by:
removeRepeatableByKeyin interfaceJobsService.JobQueueAdapter
-