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: 100MB  # Supports human-readable formats: KB, MB, GB

    # 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
    default-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

    # 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-size: 8

    # Lettuce command latency metrics (optional)
    # When enabled, Lettuce will track command latencies and publish them to Micrometer
    # Metrics: lettuce.command.firstresponse and lettuce.command.completion
    # metrics:
    #   enabled: false  # Enable Lettuce command metrics (default: false)
    #   histogram: false  # Enable histogram buckets for percentiles (default: false)
    #   local-distinction: false  # Track metrics per connection vs per host (default: false)
    #   max-latency: 5m  # Maximum expected latency for histograms (default: 5 minutes)
    #   min-latency: 1ms  # Minimum expected latency for histograms (default: 1 millisecond)

  # Cold Storage Configuration (optional)
  # Enables tiered storage with Delta Lake for archival of old messages
  # storage:
  #   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 Configuration
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

# Thread pool configuration
export KORVET_SERVER_BOSS_THREADS=1
export KORVET_SERVER_WORKER_THREADS=0  # 0 = use Netty default (2 * CPU cores)

# Request size limits
export KORVET_SERVER_MAX_REQUEST_SIZE=100MB
export KORVET_SERVER_PARTITION_MAX_SIZE=1MB

# 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_DEFAULT_OFFSET_SEQUENCE_BITS=10

# Topic Configuration
export KORVET_SERVER_AUTO_CREATE_TOPICS=true
export KORVET_SERVER_DEFAULT_PARTITIONS=1
export KORVET_SERVER_DEFAULT_RETENTION_TIME=7d
export KORVET_SERVER_DEFAULT_RETENTION_SIZE=-1  # -1 = unlimited
export KORVET_SERVER_DEFAULT_COMPRESSION=none  # none, gzip, snappy, lz4, zstd
export KORVET_SERVER_TOPIC_SEARCH_LIMIT=10000

# TLS Configuration (optional)
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

# Redis Connection
export KORVET_REDIS_URI=redis://localhost:6379
export KORVET_REDIS_HOST=localhost
export KORVET_REDIS_PORT=6379
export KORVET_REDIS_USERNAME=default
export KORVET_REDIS_PASSWORD=secret
export KORVET_REDIS_CLUSTER=false
export KORVET_REDIS_TIMEOUT=5s  # Connection timeout (optional)

# Redis Connection Pool
export KORVET_REDIS_POOL_SIZE=8  # Default: 8

# Redis Metrics (optional)
# Enables Lettuce command latency metrics published to Micrometer
export KORVET_REDIS_METRICS_ENABLED=false  # Default: false
export KORVET_REDIS_METRICS_HISTOGRAM=false  # Default: false
export KORVET_REDIS_METRICS_LOCAL_DISTINCTION=false  # Default: false
export KORVET_REDIS_METRICS_MAX_LATENCY=5m  # Default: 5m
export KORVET_REDIS_METRICS_MIN_LATENCY=1ms  # Default: 1ms

# Cold Storage (optional)
export KORVET_STORAGE_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