KlokkaSettings

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.

queues order is drain priority (earlier queues are claimed first).

Constructors

Link copied to clipboard
constructor(queues: List<QueueConfig> = listOf(QueueConfig(QueueName.DEFAULT)), role: KlokkaRole = KlokkaRole.Both, defaultRetry: RetryPolicy = RetryPolicy.exponential(), defaultTimeout: Duration? = null, codec: PayloadCodec = JsonPayloadCodec(), clock: Clock = Clock.System, lease: Duration = 5.minutes, heartbeatInterval: Duration = 1.minutes, pollInterval: Duration = 10.seconds, claimBatch: Int = 16, retention: RetentionPolicy = RetentionPolicy(), sweepInterval: Duration = 1.hours, drainTimeout: Duration = 25.seconds, lateThreshold: Duration = 1.minutes, workerId: WorkerId = WorkerId.random())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Per-attempt timeout for kinds whose registration sets none. Null, the default, means no cap: a handler runs until it returns and its lease is renewed by heartbeat the whole time. See JobRegistry.handle.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A start later than scheduledFor by more than this marks the run late in events.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard