|
For the latest stable version, please use Korvet 0.12.5! |
Configuration Reference
Complete configuration reference for Korvet.
Default Configuration
The following shows the default application.yml configuration file:
# Korvet Server Configuration
spring:
application:
name: korvet
# Korvet Configuration
korvet:
server:
# Network configuration
host: 0.0.0.0
port: 9092
# Broker configuration
broker-id: 0
keyspace: korvet # Redis keyspace prefix for all keys (topics, consumer groups, etc.)
# advertised-host: localhost # If not set, uses 'host'
# advertised-port: 9092 # If not set, uses 'port'
# Thread pool configuration
boss-threads: 1
worker-threads: 0 # 0 = use Netty default (2 * CPU cores)
# Request size limits
max-request-size: 104857600 # 100 MB
# Offset encoding configuration
# Number of bits for sequence number in offset encoding (1-16)
# Default: 10 (supports up to ~1 million messages/second per partition)
# - Use 8 for low throughput (<100K msg/sec) with long retention periods
# - Use 10 (default) for standard throughput (up to 1M msg/sec)
# - Use 14 for high throughput (1M-16M msg/sec)
# - Use 16 for very high throughput (>16M msg/sec)
# See documentation for trade-offs and offset delta constraints
offset-sequence-bits: 10
# Topic registry configuration
auto-create-topics: true # Automatically create topics when they don't exist
default-partitions: 1 # Default number of partitions for auto-created topics
# Value mapper configuration
# - json: Parse JSON messages and store each field separately in Redis Hash (default)
# - raw: Store message value as-is in a single Redis Hash field (for plain text/binary)
value-mapper: json
# Stream trim threshold (optional)
# When set, XADD will use MINID to automatically trim messages older than this duration.
# Examples: 1h, 30m, 7d, PT1H30M (ISO-8601 duration)
# trim-threshold: 7d
# TLS/SSL configuration (optional)
# tls: true
# cert-file: /path/to/server.crt
# key-file: /path/to/server.key
# key-password: changeit
# trust-cert-file: /path/to/ca.crt
# client-auth-required: false
# Redis Configuration
redis:
host: localhost
port: 6379
# Redis connection URI (supports redis://, rediss:// for TLS, redis-sentinel://, redis-cluster://)
# uri: redis://localhost:6379
# Redis authentication (optional)
# Note: username and password can also be embedded in the URI
# Example: redis://username:password@localhost:6379
# username: default
# password: changeit
# Enable cluster mode (default: false)
# cluster: false
# Connection pool configuration
pool:
max-active: 8
# max-idle: 8
# min-idle: 0
# max-wait: -1ms # -1 = wait forever
# time-between-eviction-runs: -1ms # -1 = disable
# Cold Storage Configuration (optional)
# Enables tiered storage with Delta Lake for archival of old messages
# storage:
# threshold: 6h # Messages older than this are read from cold storage. Leave unconfigured to disable
# path: s3a://my-bucket/korvet/delta # or file:///path/to/delta for local
# s3:
# region: us-east-1
# # endpoint: http://localhost:4566 # For LocalStack or MinIO
# credentials:
# type: iam # or 'static'
# # For static credentials:
# # access-key-id: AKIAIOSFODNN7EXAMPLE
# # secret-access-key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
# Spring Boot Actuator Configuration
management:
endpoints:
web:
exposure:
include: health,info,prometheus,metrics
endpoint:
health:
show-details: always
prometheus:
metrics:
export:
enabled: true
# Logging Configuration
logging:
level:
root: INFO
com.redis.korvet: DEBUG
Environment Variables
All configuration can be set via environment variables using Spring Boot’s relaxed binding:
# Server
export KORVET_SERVER_HOST=0.0.0.0
export KORVET_SERVER_PORT=9092
export KORVET_SERVER_BROKER_ID=0
export KORVET_SERVER_KEYSPACE=korvet
export KORVET_SERVER_ADVERTISED_HOST=localhost
export KORVET_SERVER_ADVERTISED_PORT=9092
# Redis Connection
export KORVET_REDIS_URI=redis://localhost:6379
export KORVET_REDIS_USERNAME=default
export KORVET_REDIS_PASSWORD=secret
export KORVET_REDIS_CLUSTER=false
# Redis Connection Pool
export KORVET_REDIS_POOL_MAX_ACTIVE=10
export KORVET_REDIS_POOL_MAX_IDLE=10
export KORVET_REDIS_POOL_MIN_IDLE=2
export KORVET_REDIS_POOL_MAX_WAIT=-1ms
export KORVET_REDIS_POOL_TIME_BETWEEN_EVICTION_RUNS=60s
export KORVET_REDIS_TIMEOUT=10s # Connection timeout
# Server Configuration
export KORVET_SERVER_SCAN_COUNT=1000 # Redis SCAN batch size
# Offset Encoding
# Number of bits for sequence number in offset encoding (1-16)
# Default: 10 (supports up to ~1 million messages/second per partition)
# See xref:quick-start/configuration.adoc#_offset_encoding_configuration[Offset Encoding Configuration] for details
export KORVET_SERVER_OFFSET_SEQUENCE_BITS=10
# Topic Registry
export KORVET_SERVER_AUTO_CREATE_TOPICS=true
export KORVET_SERVER_DEFAULT_PARTITIONS=1
# TLS
export KORVET_SERVER_TLS=true
export KORVET_SERVER_CERT_FILE=/path/to/server.crt
export KORVET_SERVER_KEY_FILE=/path/to/server.key
export KORVET_SERVER_KEY_PASSWORD=secret
export KORVET_SERVER_TRUST_CERT_FILE=/path/to/ca.crt
export KORVET_SERVER_CLIENT_AUTH_REQUIRED=false
# Cold Storage (optional)
export KORVET_STORAGE_THRESHOLD=6h
export KORVET_STORAGE_DELTA_BASE_PATH=s3a://my-bucket/korvet/delta
export KORVET_STORAGE_S3_REGION=us-east-1
export KORVET_STORAGE_S3_ENDPOINT=http://localhost:4566 # Optional: for LocalStack/MinIO
export KORVET_STORAGE_S3_CREDENTIALS_TYPE=iam # or 'static'
export KORVET_STORAGE_S3_CREDENTIALS_ROLE_ARN=arn:aws:iam::123456789012:role/KorvetReaderRole
# For static credentials:
export KORVET_STORAGE_S3_CREDENTIALS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export KORVET_STORAGE_S3_CREDENTIALS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
# Logging
export LOGGING_LEVEL_COM_REDIS_KORVET=DEBUG