Package-level declarations
Types
Link copied to clipboard
Which parts of the runtime this process runs. The same code serves all three shapes.
Link copied to clipboard
class KlokkaRuntime(store: JobStore, registry: JobRegistry, settings: KlokkaSettings = KlokkaSettings())
Link copied to clipboard
class KlokkaSettings(val queues: List<QueueConfig> = listOf(QueueConfig(QueueName.DEFAULT)), val role: KlokkaRole = KlokkaRole.Both, val defaultRetry: RetryPolicy = RetryPolicy.exponential(), val defaultTimeout: Duration? = null, val codec: PayloadCodec = JsonPayloadCodec(), val clock: Clock = Clock.System, val lease: Duration = 5.minutes, val heartbeatInterval: Duration = 1.minutes, val pollInterval: Duration = 10.seconds, val claimBatch: Int = 16, val retention: RetentionPolicy = RetentionPolicy(), val sweepInterval: Duration = 1.hours, val drainTimeout: Duration = 25.seconds, val lateThreshold: Duration = 1.minutes, val workerId: WorkerId = WorkerId.random())
Runtime tuning. Defaults are production-sane; tests inject a clock aligned with the store's clock and shrink the intervals.
Link copied to clipboard
class QueueConfig(val name: QueueName, val concurrency: Int = 8, val dispatcher: CoroutineDispatcher? = null)
Per-queue execution settings. Concurrency is a coroutine count, not a thread count: an I/O-bound queue can comfortably run hundreds. dispatcher overrides where handlers run; set it (for example to a bounded IO dispatcher) when handlers block, such as JDBC.