Micronaut Redis Configuration Reference

Every documented configuration property of Micronaut Redis, with types, descriptions, and defaults.

Micronaut Redis documentation

109 properties across 4 sections

Micronaut Redis Lettuce Cache Config Properties

Configuration properties for DefaultRedisCacheConfiguration

PropertyTypeDescription
redis.cache.serverjava.lang.StringSets the name of the server to use.
redis.cache.value-serializerjava.lang.ClassSets the {@link ObjectSerializer} to use for serializing values.
redis.cache.key-serializerjava.lang.ClassSets the {@link ObjectSerializer} to use for serializing keys.
redis.cache.expire-after-writejava.time.DurationThe expiry to use after the value is written
redis.cache.expire-after-accessjava.time.DurationThe {@link Duration}
redis.cache.expiration-after-write-policyjava.lang.StringThe class path for an implementation of ExpirationAfterWritePolicy
redis.cache.namespacejava.lang.StringSets the namespace to prefix cache keys with.
redis.cache.charsetjava.nio.charset.CharsetThe charset used to serialize and deserialize values
redis.cache.invalidate-scan-countjava.lang.LongSets the count used for the scan command in cache.RedisCache#invalidateAll() . See {@link io.lettuce.core.ScanArgs#limit(long)}. Defaults to 100L.
redis.cache.read-retriesjava.lang.IntegerThe number of times a failed cache read should be retried.
redis.cache.insert-retriesjava.lang.IntegerThe number of times a failed cache insert should be retried.

Configuration properties for RedisCacheConfiguration

PropertyTypeDescription
redis.caches.*.serverjava.lang.StringSets the name of the server to use.
redis.caches.*.value-serializerjava.lang.ClassSets the {@link ObjectSerializer} to use for serializing values.
redis.caches.*.key-serializerjava.lang.ClassSets the {@link ObjectSerializer} to use for serializing keys.
redis.caches.*.expire-after-writejava.time.DurationThe expiry to use after the value is written
redis.caches.*.expire-after-accessjava.time.DurationThe {@link Duration}
redis.caches.*.expiration-after-write-policyjava.lang.StringThe class path for an implementation of ExpirationAfterWritePolicy
redis.caches.*.namespacejava.lang.StringSets the namespace to prefix cache keys with.
redis.caches.*.charsetjava.nio.charset.CharsetThe charset used to serialize and deserialize values
redis.caches.*.invalidate-scan-countjava.lang.LongSets the count used for the scan command in cache.RedisCache#invalidateAll() . See {@link io.lettuce.core.ScanArgs#limit(long)}. Defaults to 100L.
redis.caches.*.read-retriesjava.lang.IntegerThe number of times a failed cache read should be retried.
redis.caches.*.insert-retriesjava.lang.IntegerThe number of times a failed cache insert should be retried.

Micronaut Redis Lettuce Core Config Properties

Configuration properties for DefaultRedisConfiguration

PropertyTypeDescription
redis.hostjava.lang.String
redis.sentinel-master-idjava.lang.String
redis.portint
redis.socketjava.lang.String
redis.credentials-providerio.lettuce.core.RedisCredentialsProvider
redis.timeoutjava.time.Duration
redis.databaseint
redis.client-namejava.lang.String
redis.library-namejava.lang.String
redis.library-versionjava.lang.String
redis.driver-infoio.lettuce.core.DriverInfo
redis.sslboolean
redis.verify-peerboolean
redis.start-tlsboolean
redis.urijava.net.URISets the Redis URI for configuration by string.
redis.urisjava.net.URISets the Redis URIs for cluster configuration.
redis.replica-urisjava.net.URISets the Replica Redis URIs for read replica configuration.
redis.passwordjava.lang.StringSets the Redis password as an alias for {@link #setAuthentication(CharSequence)}.
redis.io-thread-pool-sizejava.lang.IntegerSets 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-sizejava.lang.IntegerSets 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.namejava.lang.StringSets the name of the bean.
redis.read-fromjava.lang.StringSets the read from property by name. See {@link io.lettuce.core.ReadFrom#valueOf(String)}
redis.authenticationjava.lang.CharSequence

Configuration properties for RedisHealthIndicatorConfiguration

PropertyTypeDescription
redis.health.reuse-connectionbooleanWhether the health indicator should reuse a managed connection bean when available

Configuration properties for DefaultRedisConfiguration$DefaultRedisCommandLatencyRecorderConfiguration

PropertyTypeDescription
redis.metrics.command-latency-recorder.enabledjava.lang.BooleanWhether the recorder is enabled.
redis.metrics.command-latency-recorder.histogramjava.lang.BooleanWhether histograms are enabled.
redis.metrics.command-latency-recorder.local-distinctionjava.lang.BooleanWhether metrics are tracked per connection.
redis.metrics.command-latency-recorder.min-latencyjava.time.DurationThe minimum expected latency.
redis.metrics.command-latency-recorder.max-latencyjava.time.DurationThe maximum expected latency.
redis.metrics.command-latency-recorder.target-percentilesjava.util.ListThe target percentiles.

Configuration properties for DefaultRedisConnectionPoolConfiguration

PropertyTypeDescription
redis.pool.min-idlejava.lang.IntegerThe minimum idle connections count.
redis.pool.max-idlejava.lang.IntegerThe maximum idle connections count.
redis.pool.max-totaljava.lang.IntegerThe maximum total connections count.
redis.pool.enabledjava.lang.BooleanThe maximum total connections count.

Configuration properties for NamedRedisServersConfiguration

PropertyTypeDescription
redis.servers.*.hostjava.lang.String
redis.servers.*.sentinel-master-idjava.lang.String
redis.servers.*.portint
redis.servers.*.socketjava.lang.String
redis.servers.*.credentials-providerio.lettuce.core.RedisCredentialsProvider
redis.servers.*.timeoutjava.time.Duration
redis.servers.*.databaseint
redis.servers.*.client-namejava.lang.String
redis.servers.*.library-namejava.lang.String
redis.servers.*.library-versionjava.lang.String
redis.servers.*.driver-infoio.lettuce.core.DriverInfo
redis.servers.*.sslboolean
redis.servers.*.verify-peerboolean
redis.servers.*.start-tlsboolean
redis.servers.*.urijava.net.URISets the Redis URI for configuration by string.
redis.servers.*.urisjava.net.URISets the Redis URIs for cluster configuration.
redis.servers.*.replica-urisjava.net.URISets the Replica Redis URIs for read replica configuration.
redis.servers.*.passwordjava.lang.StringSets the Redis password as an alias for {@link #setAuthentication(CharSequence)}.
redis.servers.*.io-thread-pool-sizejava.lang.IntegerSets 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-sizejava.lang.IntegerSets 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.*.namejava.lang.StringSets the name of the bean.
redis.servers.*.read-fromjava.lang.StringSets the read from property by name. See {@link io.lettuce.core.ReadFrom#valueOf(String)}
redis.servers.*.authenticationjava.lang.CharSequence

Configuration properties for NamedRedisServersConfiguration$NamedRedisCommandLatencyRecorderConfiguration

PropertyTypeDescription
redis.servers.*.metrics.command-latency-recorder.enabledjava.lang.BooleanWhether the recorder is enabled.
redis.servers.*.metrics.command-latency-recorder.histogramjava.lang.BooleanWhether histograms are enabled.
redis.servers.*.metrics.command-latency-recorder.local-distinctionjava.lang.BooleanWhether metrics are tracked per connection.
redis.servers.*.metrics.command-latency-recorder.min-latencyjava.time.DurationThe minimum expected latency.
redis.servers.*.metrics.command-latency-recorder.max-latencyjava.time.DurationThe maximum expected latency.
redis.servers.*.metrics.command-latency-recorder.target-percentilesjava.util.ListThe target percentiles.

Micronaut Redis Lettuce Pubsub Config Properties

Configuration properties for RedisPubSubConfiguration

PropertyTypeDescription
redis.pubsub.default-body-media-typeMediaTypeThe default body media type

Micronaut Redis Lettuce Session Config Properties

Configuration properties for RedisHttpSessionConfiguration

PropertyTypeDescription
micronaut.session.max-active-sessionsjava.lang.Integer
micronaut.session.max-inactive-intervaljava.time.Duration
micronaut.session.prompt-expirationboolean
micronaut.session.http.base64-encodeboolean
micronaut.session.http.cookie-namejava.lang.String
micronaut.session.http.prefixjava.lang.String
micronaut.session.http.header-namesjava.lang.String
micronaut.session.http.cookie-pathjava.lang.String
micronaut.session.http.domain-namejava.lang.String
micronaut.session.http.cookie-domainjava.lang.String
micronaut.session.http.cookie-max-agejava.time.temporal.TemporalAmount
micronaut.session.http.remember-meboolean
micronaut.session.http.cookie-securejava.lang.Boolean
micronaut.session.http.cookie-same-siteSameSite
micronaut.session.http.redis.namespacejava.lang.StringSets the namespace to use.
micronaut.session.http.redis.server-namejava.lang.StringSets the server name.
micronaut.session.http.redis.session-created-topicjava.lang.StringSets the topic to publish session created events to.
micronaut.session.http.redis.active-sessions-keyjava.lang.StringSets the key to store active sessions in.
micronaut.session.http.redis.value-serializerjava.lang.ClassSets the default value serializer to use.
micronaut.session.http.redis.charsetjava.nio.charset.CharsetSets the charset to use to serialize values.
micronaut.session.http.redis.enable-keyspace-eventsbooleanSets whether keyspace events should be enabled at startup.
micronaut.session.http.redis.write-modeRedisHttpSessionConfiguration$WriteModeSets the write mode to use.
micronaut.session.http.redis.expired-session-checkjava.time.DurationSets the duration to check for expired sessions.