.cloudstate-proxy-jdbc_2.13.0.6.0.source-code.reference.conf Maven / Gradle / Ivy
The newest version!
cloudstate.proxy {
jdbc {
auto-create-tables = true
create-tables-timeout = 10s
}
value-entity {
persistence {
# This property indicates which configuration must be used by Slick.
jdbc {
store-class = "io.cloudstate.proxy.valueentity.store.jdbc.JdbcStore"
slick {
connectionPool = "HikariCP"
# This property indicates which profile must be used by Slick.
# Possible values are: slick.jdbc.PostgresProfile$, slick.jdbc.MySQLProfile$ and slick.jdbc.H2Profile$
# (uncomment and set the property below to match your needs)
# profile = "slick.jdbc.PostgresProfile$"
# The JDBC driver to use
# (uncomment and set the property below to match your needs)
# driver = "org.postgresql.Driver"
# The JDBC URL for the chosen database
# (uncomment and set the property below to match your needs)
# url = "jdbc:postgresql://localhost:5432/cloudstate"
# The database username
# (uncomment and set the property below to match your needs)
# user = "cloudstate"
# The database password
# (uncomment and set the property below to match your needs)
# password = "cloudstate"
## copy and adapted from akka-persistece-jdbc
# hikariCP settings; see: https://github.com/brettwooldridge/HikariCP
# Slick will use an async executor with a fixed size queue of 10.000 objects
# The async executor is a connection pool for asynchronous execution of blocking I/O actions.
# This is used for the asynchronous query execution API on top of blocking back-ends like JDBC.
queueSize = 10000 // number of objects that can be queued by the async exector
# This property controls the maximum number of milliseconds that a client (that's you) will wait for a connection
# from the pool. If this time is exceeded without a connection becoming available, a SQLException will be thrown.
# 1000ms is the minimum value. Default: 180000 (3 minutes)
connectionTimeout = 180000
# This property controls the maximum amount of time that a connection will be tested for aliveness.
# This value must be less than the connectionTimeout. The lowest accepted validation timeout is 1000ms (1 second). Default: 5000
validationTimeout = 5000
# 10 minutes: This property controls the maximum amount of time that a connection is allowed to sit idle in the pool.
# Whether a connection is retired as idle or not is subject to a maximum variation of +30 seconds, and average variation
# of +15 seconds. A connection will never be retired as idle before this timeout. A value of 0 means that idle connections
# are never removed from the pool. Default: 600000 (10 minutes)
idleTimeout = 600000
# 30 minutes: This property controls the maximum lifetime of a connection in the pool. When a connection reaches this timeout
# it will be retired from the pool, subject to a maximum variation of +30 seconds. An in-use connection will never be retired,
# only when it is closed will it then be removed. We strongly recommend setting this value, and it should be at least 30 seconds
# less than any database-level connection timeout. A value of 0 indicates no maximum lifetime (infinite lifetime),
# subject of course to the idleTimeout setting. Default: 1800000 (30 minutes)
maxLifetime = 1800000
# This property controls the amount of time that a connection can be out of the pool before a message is logged indicating a
# possible connection leak. A value of 0 means leak detection is disabled.
# Lowest acceptable value for enabling leak detection is 2000 (2 secs). Default: 0
leakDetectionThreshold = 0
# ensures that the database does not get dropped while we are using it
keepAliveConnection = on
# See some tips on thread/connection pool sizing on https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
# Keep in mind that the number of threads must equal the maximum number of connections.
numThreads = 5
maxConnections = 5
minConnections = 5
# This property controls a user-defined name for the connection pool and appears mainly in logging and JMX
# management consoles to identify pools and pool configurations. Default: auto-generated
poolName = "cloudstate-value-entity-connection-pool"
}
# These settings describe the database tables for storing Value Entities
tables {
state {
tableName = "value_entity_state"
schemaName = ""
columnNames {
persistentId = "persistent_id"
entityId = "entity_id"
typeUrl = "type_url"
state = "state"
}
}
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy