Configuration Reference

Version:7.0.0-SNAPSHOT

Micronaut Redis Lettuce Config Properties

🔗
Table 1. Configuration Properties for RedisHttpSessionConfiguration
Property Type Description Default value

micronaut.session.max-active-sessions

java.lang.Integer

micronaut.session.max-inactive-interval

java.time.Duration

micronaut.session.prompt-expiration

boolean

micronaut.session.http.base64-encode

boolean

micronaut.session.http.cookie-name

java.lang.String

micronaut.session.http.prefix

java.lang.String

micronaut.session.http.header-names

java.lang.String

micronaut.session.http.cookie-path

java.lang.String

micronaut.session.http.domain-name

java.lang.String

micronaut.session.http.cookie-domain

java.lang.String

micronaut.session.http.cookie-max-age

java.time.temporal.TemporalAmount

micronaut.session.http.remember-me

boolean

micronaut.session.http.cookie-secure

java.lang.Boolean

micronaut.session.http.cookie-same-site

SameSite

micronaut.session.http.redis.namespace

java.lang.String

Sets the namespace to use.

micronaut.session.http.redis.server-name

java.lang.String

Sets the server name.

micronaut.session.http.redis.session-created-topic

java.lang.String

Sets the topic to publish session created events to.

micronaut.session.http.redis.active-sessions-key

java.lang.String

Sets the key to store active sessions in.

micronaut.session.http.redis.value-serializer

java.lang.Class

Sets the default value serializer to use.

micronaut.session.http.redis.charset

java.nio.charset.Charset

Sets the charset to use to serialize values.

micronaut.session.http.redis.enable-keyspace-events

boolean

Sets whether keyspace events should be enabled at startup.

micronaut.session.http.redis.write-mode

RedisHttpSessionConfiguration$WriteMode

Sets the write mode to use.

micronaut.session.http.redis.expired-session-check

java.time.Duration

Sets the duration to check for expired sessions.

🔗
Table 2. Configuration Properties for DefaultRedisConfiguration
Property Type Description Default value

redis.host

java.lang.String

redis.sentinel-master-id

java.lang.String

redis.port

int

redis.socket

java.lang.String

redis.authentication

java.lang.CharSequence

redis.credentials-provider

io.lettuce.core.RedisCredentialsProvider

redis.timeout

java.time.Duration

redis.database

int

redis.client-name

java.lang.String

redis.library-name

java.lang.String

redis.library-version

java.lang.String

redis.driver-info

io.lettuce.core.DriverInfo

redis.ssl

boolean

redis.verify-peer

boolean

redis.start-tls

boolean

redis.uri

java.net.URI

Sets the Redis URI for configuration by string.

redis.uris

java.net.URI

Sets the Redis URIs for cluster configuration.

redis.replica-uris

java.net.URI

Sets the Replica Redis URIs for read replica configuration.

redis.io-thread-pool-size

java.lang.Integer

Sets the thread pool size (number of threads to use) for I/O operations (default value is the number of CPUs). The thread pool size is only effective if no {@link io.lettuce.core.resource.ClientResources.Builder#eventLoopGroupProvider} is provided.

{@link io.lettuce.core.resource.ClientResources.Builder#ioThreadPoolSize(int)}

redis.computation-thread-pool-size

java.lang.Integer

Sets the thread pool size (number of threads to use) for computation operations (default value is the number of CPUs). The thread pool size is only effective if no {@link io.lettuce.core.resource.ClientResources.Builder#eventExecutorGroup} is provided.

{@link io.lettuce.core.resource.ClientResources.Builder#computationThreadPoolSize(int)}

redis.name

java.lang.String

Sets the name of the bean.

redis.read-from

java.lang.String

Sets the read from property by name.

See {@link io.lettuce.core.ReadFrom#valueOf(String)}

🔗
Table 3. Configuration Properties for DefaultRedisCacheConfiguration
Property Type Description Default value

redis.cache.server

java.lang.String

The name of the server to use.

redis.cache.value-serializer

java.lang.Class

The {@link ObjectSerializer} type to use for serializing values.

redis.cache.key-serializer

java.lang.Class

The optional {@link ObjectSerializer} class

redis.cache.expire-after-write

java.time.Duration

The expiry to use after the value is written

redis.cache.expire-after-access

java.time.Duration

The {@link Duration}

redis.cache.expiration-after-write-policy

java.lang.String

The class path for an implementation of ExpirationAfterWritePolicy

redis.cache.charset

java.nio.charset.Charset

The charset used to serialize and deserialize values

redis.cache.invalidate-scan-count

java.lang.Long

Sets the count used for the scan command in cache.RedisCache#invalidateAll(). See {@link io.lettuce.core.ScanArgs#limit(long)}. Defaults to 100L.

🔗
Table 4. Configuration Properties for RedisCacheConfiguration
Property Type Description Default value

redis.caches.*.server

java.lang.String

The name of the server to use.

redis.caches.*.value-serializer

java.lang.Class

The {@link ObjectSerializer} type to use for serializing values.

redis.caches.*.key-serializer

java.lang.Class

The optional {@link ObjectSerializer} class

redis.caches.*.expire-after-write

java.time.Duration

The expiry to use after the value is written

redis.caches.*.expire-after-access

java.time.Duration

The {@link Duration}

redis.caches.*.expiration-after-write-policy

java.lang.String

The class path for an implementation of ExpirationAfterWritePolicy

redis.caches.*.charset

java.nio.charset.Charset

The charset used to serialize and deserialize values

redis.caches.*.invalidate-scan-count

java.lang.Long

Sets the count used for the scan command in cache.RedisCache#invalidateAll(). See {@link io.lettuce.core.ScanArgs#limit(long)}. Defaults to 100L.

🔗
Table 5. Configuration Properties for DefaultRedisConnectionPoolConfiguration
Property Type Description Default value

redis.pool.min-idle

java.lang.Integer

The minimum idle connections count.

redis.pool.max-idle

java.lang.Integer

The maximum idle connections count.

redis.pool.max-total

java.lang.Integer

The maximum total connections count.

redis.pool.enabled

java.lang.Boolean

The maximum total connections count.

🔗
Table 6. Configuration Properties for NamedRedisServersConfiguration
Property Type Description Default value

redis.servers.*.host

java.lang.String

redis.servers.*.sentinel-master-id

java.lang.String

redis.servers.*.port

int

redis.servers.*.socket

java.lang.String

redis.servers.*.authentication

java.lang.CharSequence

redis.servers.*.credentials-provider

io.lettuce.core.RedisCredentialsProvider

redis.servers.*.timeout

java.time.Duration

redis.servers.*.database

int

redis.servers.*.client-name

java.lang.String

redis.servers.*.library-name

java.lang.String

redis.servers.*.library-version

java.lang.String

redis.servers.*.driver-info

io.lettuce.core.DriverInfo

redis.servers.*.ssl

boolean

redis.servers.*.verify-peer

boolean

redis.servers.*.start-tls

boolean

redis.servers.*.uri

java.net.URI

Sets the Redis URI for configuration by string.

redis.servers.*.uris

java.net.URI

Sets the Redis URIs for cluster configuration.

redis.servers.*.replica-uris

java.net.URI

Sets the Replica Redis URIs for read replica configuration.

redis.servers.*.io-thread-pool-size

java.lang.Integer

Sets the thread pool size (number of threads to use) for I/O operations (default value is the number of CPUs). The thread pool size is only effective if no {@link io.lettuce.core.resource.ClientResources.Builder#eventLoopGroupProvider} is provided.

{@link io.lettuce.core.resource.ClientResources.Builder#ioThreadPoolSize(int)}

redis.servers.*.computation-thread-pool-size

java.lang.Integer

Sets the thread pool size (number of threads to use) for computation operations (default value is the number of CPUs). The thread pool size is only effective if no {@link io.lettuce.core.resource.ClientResources.Builder#eventExecutorGroup} is provided.

{@link io.lettuce.core.resource.ClientResources.Builder#computationThreadPoolSize(int)}

redis.servers.*.name

java.lang.String

Sets the name of the bean.

redis.servers.*.read-from

java.lang.String

Sets the read from property by name.

See {@link io.lettuce.core.ReadFrom#valueOf(String)}