KandraConfig
Configuration for the Kandra Ktor plugin.
install(Kandra) {
contactPoints = "localhost:9042"
keyspace = "coinx"
localDatacenter = "datacenter1"
autoCreateKeyspace = true
schemaMode = SchemaMode.AUTO_CREATE
register(User::class, Wallet::class)
pool { requestTimeoutMillis = 10_000 }
auth { provider = KandraAuth.fromEnv() }
retry { maxAttempts = 5 }
debug { logQueries = true; logSlowQueriesMs = 500 }
validate<User> { user ->
buildList { if (user.email.isBlank()) add(KandraValidationError("email", "cannot be blank")) }
}
}Properties
When true, large batches are automatically split into chunks of batchMaxChunkSize.
Maximum statements per batch chunk when auto-chunking.
Batch warn threshold in KB — logs WARN when a batch exceeds this size estimate.
When true, registers a /kandra/health route (and Ktor HealthCheck integration if available).
How long (in milliseconds) a /kandra/health result is cached before the next request triggers a fresh SELECT release_version FROM system.local against the cluster (GH-36). Without this, a probe storm (misconfigured monitoring, or deliberate abuse if the route is reachable beyond an orchestrator's internal network) translates 1:1 into real cluster queries. Set to 0 to disable caching and query on every request.
Log WARN when deleteBy/deleteAll would generate more than this many tombstones.
When true, validates keyspace permissions at startup (SELECT + MODIFY required).