blob: af1ba3605422e4e8d9973a0656935e73c25280ba [file] [log] [blame]
# James reference configuration for the DataStax Java driver for Apache Cassandra®.
#
# Unless you use a custom mechanism to load your configuration (see
# SessionBuilder.withConfigLoader), all the values declared here will be used as defaults.
#
# See https://docs.datastax.com/en/developer/java-driver/4.13/manual/core/configuration/ for
# available options.
#
# Please note that contact point and authentication needs to be set in cassandra.properties for now.
datastax-java-driver {
basic.request {
timeout = 5 seconds
consistency = QUORUM
page-size = 5000
serial-consistency = SERIAL
}
advanced.connection {
connect-timeout = 5 seconds
init-query-timeout = 5 seconds
pool {
local.size = 2
remote.size = 2
}
max-requests-per-connection = 1024
max-orphan-requests = 256
warn-on-init-error = true
}
advanced.throttler {
// class = org.apache.james.backends.cassandra.utils.LockLessConcurrencyLimitingRequestThrottler
class = ConcurrencyLimitingRequestThrottler
max-queue-size = 10000
max-concurrent-requests = 192
}
advanced.reconnect-on-init = true
advanced.reconnection-policy {
class = ExponentialReconnectionPolicy
base-delay = 1 second
max-delay = 60 seconds
}
advanced.retry-policy {
class = DefaultRetryPolicy
}
advanced.ssl-engine-factory {
// class = DefaultSslEngineFactory
// hostname-validation = true
// truststore-path = /path/to/client.truststore
// truststore-password = password123
// keystore-path = /path/to/client.keystore
// keystore-password = password123
}
advanced.request-tracker {
logs {
slow {
threshold = 2 second
enabled = true
}
max-query-length = 500
}
}
advanced.metrics {
factory {
class = DefaultMetricsFactory
}
id-generator {
class = DefaultMetricIdGenerator
prefix = "cassandra"
}
session {
enabled = [
// bytes-sent,
// bytes-received
// connected-nodes,
// cql-requests,
// cql-client-timeouts,
// cql-prepared-cache-size,
// throttling.delay,
// throttling.queue-size,
// throttling.errors,
]
cql-requests {
highest-latency = 10 seconds
lowest-latency = 1 millisecond
significant-digits = 3
refresh-interval = 5 minutes
}
}
}
profiles {
# Provides controls on Execution profiles used by James
LWT {
basic.request.consistency = SERIAL
basic.request.serial-consistency = SERIAL
}
CACHING {
basic.request.consistency = LOCAL_ONE
basic.request.serial-consistency = LOCAL_ONE
basic.request.timeout = 100 milliseconds
}
OPTIMISTIC_CONSISTENCY_LEVEL {
basic.request.consistency = LOCAL_ONE
basic.request.serial-consistency = LOCAL_ONE
}
BATCH {
basic.request.timeout = 1 hour
}
}
}