claimBatch

@Transactional
fun claimBatch(maxRetries: Int, retriableBefore: Instant, stuckBefore: Instant, batchSize: Int): List<OutboxMessage>(source)

Short transaction: select + lock a batch with FOR UPDATE SKIP LOCKED and transition each row to PROCESSING. Commits immediately, freeing the lock so other pollers can proceed.