Configuration reference

Curated reference of the StoatFlow configuration keys — stoatflow.* (engine) and runtime.* (HTTP, metrics, health) — with type, default, and a one-line description per key.

Every StoatFlow application is configured from a single application.yaml (loaded by StoatFlowRuntime.fromConfig(...)), plus environment-variable and system-property overrides. This page is a curated reference of the keys you are most likely to set, grouped by area, each with its type, default, and a one-line description.

The authoritative, always-current list of every key — including bound constraints, enums, and examples — is the JSON Schema shipped in the runtime artifact: runtime/src/main/resources/schemas/stoatflow-config-schema.json. IDEs (VS Code with the Red Hat YAML extension, IntelliJ) pick it up automatically for autocompletion and validation. This page omits a handful of advanced, fine-grained tuning knobs; the schema lists them all.

For the configuration model — the four override layers, env-var naming, and how stoatflow.* maps onto the core engine — see Configuration model. For Kafka client passthrough, see Kafka client config.

How to read this page

  • Key — the YAML path under stoatflow: or runtime:. Nest by the dots (commit-barrier.interval-ms lives under stoatflow.commit-barrier.interval-ms).
  • Type — YAML scalar type or enum value set.
  • Default — the value used when the key is omitted. means no default (the value must be set, or it is null/unset).
  • Defaults shown as expressions (e.g. max(2, CPU cores)) are resolved at startup from the host.
Secrets (the license key, Kafka SASL passwords, Schema Registry credentials) should be supplied via environment-variable interpolation (${STOATFLOW_LICENSE_KEY}) — never hard-coded in committed YAML. See License configuration.

stoatflow — top level

The required and most common engine keys.

KeyTypeDefaultDescription
application-idstring— (required)Unique application identifier; used for the consumer group and transactional id.
bootstrap-serversstringlocalhost:9092Kafka bootstrap servers (comma-separated).
processing-guaranteeenum EXACTLY_ONCE | AT_LEAST_ONCEEXACTLY_ONCECommit protocol. Exactly-once uses Kafka transactions; at-least-once uses non-transactional commit (lower latency, duplicates possible on crash recovery).
default-key-serdestring (FQCN)Fully qualified class name of the default key Serde when none is given explicitly.
default-value-serdestring (FQCN)Fully qualified class name of the default value Serde when none is given explicitly.
schema-registry-urlstringConfluent Schema Registry URL. When set, propagated to serdes and enables the Schema Registry health check.
deserialization-exception-handlerstring (FQCN)Handler class deciding CONTINUE vs FAIL on deserialization errors.
production-exception-handlerstring (FQCN)Handler class for serialization and send errors.
processing-exception-handlerstring (FQCN)Handler class for exceptions thrown by process().
rocks-db-config-setterstring (FQCN)Custom RocksDBConfigSetter for advanced per-store RocksDB tuning.
application-serverstring (host:port)localhost:<http.port>Advertised host:port for interactive-query metadata (KS application.server). Single instance: identifies this instance as the active host for all stores.

See Error handling and DLQ for the built-in exception handler classes.

stoatflow.lanes

Key-affinity lane parallelism. See Lanes and parallelism.

KeyTypeDefaultDescription
lanes.countintegermax(2, CPU cores)Number of key-affinity lanes (parallel processing units).
lanes.queue-capacityinteger300Capacity of each lane's queue; controls backpressure.
lanes.thread-typeenum VIRTUAL | PLATFORMVIRTUALLane thread type. Virtual (Project Loom) by default; platform threads available for the JNI RocksDB backend.

stoatflow.commit-barrier

Commit-barrier cadence and the bounds the engine self-tunes within. The interval between barriers is adaptive at runtime; you set the seed and the floor/ceiling. See Exactly-once.

KeyTypeDefaultDescription
commit-barrier.interval-msinteger500Seed interval between commit barriers; the initial value before adaptive scheduling takes over.
commit-barrier.min-interval-msinteger150Lower bound on the barrier-to-barrier interval.
commit-barrier.max-interval-msinteger5000Upper bound on the barrier-to-barrier interval.
commit-barrier.timeout-msinteger60000Timeout for barrier completion. Bounds the commit critical path and cascades to the producer's transaction.timeout.ms, max.block.ms, and delivery.timeout.ms. Must be greater than interval-ms.
commit-barrier.dedicated-commit-threadbooleantrueRun commits on a dedicated thread so a lane is not stalled during the Kafka transaction commit and state flush.
commit-barrier.max-epoch-recordsinteger— (no cap)Optional hard upper bound on records committed per epoch. Unset means the engine sizes epochs adaptively within the interval bounds above.
commit-barrier.max-engine-restartsinteger5Max fault-triggered in-place engine restarts within the rolling window below before the instance escalates to a terminal shutdown. 0 disables in-place restart recovery.
commit-barrier.engine-restart-window-msinteger300000 (5 min)Rolling window over which fault-triggered engine restarts are counted. Bounds a recurring fault to max-engine-restarts restarts per window instead of looping.
The schema exposes additional fine-grained commit-barrier tuning factors (smoothing and growth parameters for the adaptive epoch sizer). These rarely need changing — leave them at their defaults unless directed by support. They are listed in full in the JSON schema.

stoatflow.state

State-store storage, caching, and restoration. See State stores and Migration (with data).

KeyTypeDefaultDescription
state.dirstring${java.io.tmpdir}/stoatflowDirectory for state-store data. Put it on fast local storage (SSD); in Kubernetes, on a persistent volume.
state.uncommitted-max-bytesinteger (bytes)268435456 (256 MiB)Global cap on uncommitted state bytes across all stores; exceeding it triggers an early commit barrier.
state.restoration-enabledbooleantrueRestore state from changelog topics on startup when local state is missing.
state.restoration-pool-sizeintegerCPU cores × 2Restoration worker pool size; each worker uses its own consumer for parallel fetch.
state.restoration-batch-sizeinteger20000Records per RocksDB write batch during restoration.
state.sst-restoration-enabledbooleanfalseOpt-in SST-file ingestion for full cold-start KV restoration (bypasses memtable/L0).
state.parallel-store-commitsbooleantrueCommit multiple stores in parallel at barrier time.
state.parallel-store-commit-threadsintegerCPU coresMax platform threads for parallel store commits (used only with 2+ transactional stores).
state.cleanup-delay-msinteger600000 (10 min)Delay before deleting RocksDB directories for stores no longer in the topology. 0 = immediate, -1 = never delete (detect + warn only).
state.cleanup-dir-max-age-msinteger (ms)-1 (disabled)Age threshold for purging local per-store state directories untouched for at least this long at startup (KIP-1259); they are rebuilt from the changelog. Set ≥ the changelog's delete.retention.ms. Distinct from cleanup-delay-ms (orphaned-store cleanup).
state.segment-checkpoint-recordsinteger100000Periodic checkpoint cadence for segmented window/session stores, by record count. These stores run with the WAL off and become durable only on close(), so a checkpoint (flush dirty segments, then the offsets) bounds how much of the changelog an ungraceful restart — or a hot-standby promotion — has to re-apply. Whichever-first with state.segment-checkpoint-ms. Deliberately coarse to limit SST/compaction churn.
state.segment-checkpoint-msinteger (ms)30000 (30 s)The same checkpoint cadence by wall-clock time; whichever-first with state.segment-checkpoint-records.

Advanced SST knobs (state.sst-buffer-max-bytes, state.sst-flush-interval-files) and state.flush-min-entries-per-chunk are in the schema.

stoatflow.changelog

Changelog topics that back state stores. See State stores.

KeyTypeDefaultDescription
changelog.enabledbooleantrueWrite state mutations to Kafka changelog topics within the transaction.
changelog.create-topics-if-not-existbooleantrueAuto-create changelog topics (with cleanup.policy=compact) when missing.
changelog.replication-factorinteger-1 (broker default)Replication factor for auto-created changelog topics.
changelog.num-partitionsinteger1Partition count for auto-created changelog topics (single instance: 1 is usually sufficient).

stoatflow.watermark

Event-time watermark generation. See Event time and watermarks.

KeyTypeDefaultDescription
watermark.max-out-of-orderness-msinteger10000Allowed out-of-orderness before an event is considered late.
watermark.idleness-timeout-msinteger300000 (5 min)Partitions idle for this long are excluded from the global watermark. 0 disables.
watermark.auto-interval-msinteger200Periodic watermark emission interval.

stoatflow.processing

Processing behavior. The keys below are the public, commonly-set ones; the schema additionally exposes a number of low-level dispatch/yield tuning knobs that should normally be left at defaults.

KeyTypeDefaultDescription
processing.mdc-enabledbooleanfalsePopulate logging MDC keys (laneId, sourceTopic, sourcePartition, sourceOffset) during processing.
processing.max-task-idle-msinteger0Wait time for empty partition buffers to preserve cross-partition timestamp order. -1 = process immediately, 0 = wait only while broker has lag, >0 = extra wait.
processing.buffered-records-per-partitioninteger2000Max records buffered per partition before pausing consumption (must be ≥ max.poll.records).
processing.consumer-poll-timeout-msinteger20Consumer poll() fallback timeout.
processing.dispatch-modeenum AUTO | DIRECT | LANELANERecord dispatch mode. LANE routes via key-affinity lanes; AUTO may pick DIRECT for simple stateless topologies; DIRECT is experimental.
processing.parallel-deser-modeenum AUTO | ON | OFFAUTOParallel deserialization. AUTO enables it when per-record cost is high enough; ON/OFF force it.
processing.timestamp-coordination-modeenum AUTO | ENABLED | DISABLEDAUTOEvent-time coordination. AUTO derives from topology traits; override only for debugging.
processing.timestamp-ordered-dispatchbooleantrueDispatch records in global timestamp order across partitions.
processing.wall-clock-advance-interval-msinteger10Cadence for wall-clock punctuators and scheduled sources.
processing.state-transition-history-sizeinteger20Number of past app-state transitions retained for the /state endpoint.

stoatflow.validation

Startup and single-instance safety checks. See How StoatFlow differs from KS.

KeyTypeDefaultDescription
validation.ensure-explicit-namingbooleantrueFail startup if any topology operation uses an auto-generated name (KIP-1111).
validation.validate-complete-assignmentbooleantrueWait for and verify that all source-topic partitions are assigned at startup.
validation.partition-assignment-timeout-msinteger60000Timeout to wait for complete partition assignment after subscribe.
validation.pre-flight-consumer-group-checkbooleanfalseCheck for active consumer-group members before starting (prevents accidental duplicate instances).

stoatflow.shutdown

Graceful shutdown behavior. See Probes.

KeyTypeDefaultDescription
shutdown.timeout-msinteger25000Timeout for graceful shutdown; lets in-flight barriers complete.
shutdown.leave-group-on-closebooleanfalseWhether the consumer sends a LeaveGroup on close. Disabled (with static membership) gives faster restart reassignment.
shutdown.hard-exit-on-shutdown-hangbooleantrueIf graceful shutdown stalls past its budget, force a clean process exit so Kubernetes restarts the pod.
shutdown.hard-exit-budget-msinteger2 × shutdown.timeout-msBudget before the hard-exit fallback fires. Must be ≥ shutdown.timeout-ms.

stoatflow.commit-stall

Commit-pipeline freeze detection. These bounds also drive the liveness probe's stall check. See Probes.

KeyTypeDefaultDescription
commit-stall.threshold-msinteger45000If commit work stalls longer than this, a thread dump is captured, graceful shutdown begins, and /health/live returns DOWN. Must be less than commit-barrier.timeout-ms. 0 disables.
commit-stall.poll-interval-msinteger5000How often the stall check runs.
commit-stall.dump-enabledbooleantrueEmit a thread dump to logs when a stall is detected.

stoatflow.rocks-db

RocksDB preset and backend. See State stores.

KeyTypeDefaultDescription
rocks-db.presetenum DEFAULT | LOW_MEMORY | HIGH_PERFORMANCEDEFAULTMemory preset. DEFAULT ≈ 256 MB, LOW_MEMORY ≈ 64 MB, HIGH_PERFORMANCE ≈ 1 GB.
rocks-db.backendenum AUTO | FFM | JNIAUTORocksDB binding. AUTO picks the faster path per runtime — FFM on the JVM, JNI under a GraalVM native image. FFM has lower per-call overhead on HotSpot; JNI uses the rocksdbjni bindings.

stoatflow.caching

Downstream emission suppression for KTables. See Aggregations.

KeyTypeDefaultDescription
caching.emission-suppression-enabledbooleantrueCompact multiple writes to the same key within a barrier interval, emitting only the final value.
caching.max-entriesinteger2147483647 (unbounded)Per-store cached-entry cap before an early barrier. Unbounded by default so it never bites high-cardinality workloads — bytes are the default lever; set a finite value for a count-based bound.
caching.max-estimated-bytesinteger (bytes)268435456 (256 MiB)Max estimated cached bytes per store before an early barrier.

stoatflow.timer-backend

Timer storage backend for the Processor API. See Processor API.

KeyTypeDefaultDescription
timer-backend.typeenum HEAP | PERSISTENT | HYBRIDHYBRIDHEAP = in-memory (fast, unbounded), PERSISTENT = RocksDB only (memory-bounded), HYBRID = heap cache + RocksDB.
timer-backend.changelog-enabledbooleantrueLog timer mutations to a Kafka changelog for durability (applies to all types).
timer-backend.cache-horizon-msinteger60000HYBRID only: how far ahead timers are cached in the heap. Must be > load-interval-ms.
timer-backend.load-interval-msinteger10000HYBRID only: how often the loader pulls upcoming timers from RocksDB. Must be < cache-horizon-ms.

stoatflow.ktable / stoatflow.fk-join / stoatflow.dsl

KeyTypeDefaultDescription
ktable.auto-reuse-source-topicsbooleantrueReuse compacted KTable source topics for restoration instead of separate changelog topics.
fk-join.use-reverse-index-cachebooleantrueMaintain an in-memory reverse index for O(1) FK-join right-side lookups (disable to save heap on very large FK tables).
dsl.store-formatenum DEFAULT | HEADERSDEFAULTGlobal default on-disk format for DSL-materialized stores (KIP-1285). HEADERS makes DSL aggregations persist record headers (KIP-1271). Per-store Materialized.withRecordHeaders() / withoutRecordHeaders() always wins.

stoatflow.kafka

Kafka client passthrough. Values under these maps are merged on top of StoatFlow's framework defaults; forced overrides (e.g. bootstrap.servers, group.id, enable.auto.commit=false) cannot be changed. Full resolution order in Kafka client config.

KeyTypeDefaultDescription
kafka.consumermap<string,string>{}Additional consumer properties (e.g. auto.offset.reset, max.poll.records).
kafka.producermap<string,string>{}Additional producer properties (e.g. compression.type, linger.ms).
kafka.restoration-consumermap<string,string>{}Overrides for the restoration consumer only.

stoatflow.license

Runtime license. See License configuration.

KeyTypeDefaultDescription
license.keystringLicense key string. Use ${STOATFLOW_LICENSE_KEY} interpolation; do not hard-code.
license.filestringPath to a chmod 600 file holding the key on one line. Mutually exclusive with key (key wins).
license.environmentstringDeployment environment label feeding the machine fingerprint. Required for the Production tier.
license.cache-dirstring~/.stoatflow/license-cache/Offline-cache directory. In Kubernetes, mount on a persistent volume so it survives restarts.
license.verbose-bannerbooleanfalseInclude the customer name in the startup banner.
License env vars and -D system properties (STOATFLOW_LICENSE_*) take precedence over these YAML values.

stoatflow.ha

Opt-in hot-standby high availability. With mode: off (default) the application is a single instance. See High availability.

KeyTypeDefaultDescription
ha.modeenumoffoff (single instance) or active-standby (hot-standby cluster: one active + one or more warm standbys).
ha.pod-idstringPOD_NAMEHOSTNAME → hostnameStable per-pod identity distinguishing the peers.
ha.coordination-topicstring__stoatflow_<applicationId>_haSingle-partition, compacted, auto-created topic the cluster coordinates through (heartbeats + the promotion token).
ha.desired-standbysinteger1Caught-up standby spares the readiness gate protects. 1 is the classic active/passive pair; raise it (with replicas) for more redundancy. Drives the redundancy floor on rolling deploys.
ha.max-standbysinteger3Ceiling on standbys, bounding changelog fan-out (each standby is one more changelog reader). Total instances ≤ max-standbys + 1.
ha.failover-priorityinteger0Per-pod tie-break hint ordering candidates within the equal-lag bucket (higher wins). Never overrides lag or the hash floor.
ha.promotion-settle-window-msinteger500After claiming the promotion token, how long the winner confirms it is the sole claimant before fencing (single-promoter guarantee). Bounded 1..ha.staleness-threshold-ms.
ha.heartbeat-msinteger1000How often each pod publishes its liveness and role.
ha.staleness-threshold-msinteger5000Gap without a peer heartbeat before it's considered stale. Must be ≥ ha.heartbeat-ms.
ha.staleness-missesinteger3Consecutive missed checks before a standby is elected to promote (debounce).
ha.acceptable-recovery-laginteger50000Total committed-changelog lag (records, summed across all changelog partitions) at/below which a standby is caught up (READY_STANDBY) and promotion-eligible without the grace fallback. A single total sum, not per-task like KS's acceptable.recovery.lag (10000). Correctness never depends on it (restore-before-process does); mostly a raise-me lever.
ha.promotion-grace-msinteger5000Grace window after which the least-behind standby auto-promotes when no standby is within acceptable-recovery-lag (availability-first; eligibility re-checked continuously).
ha.promotion-restore-no-progress-timeout-msinteger60000Progress-aware deadline for restore-before-process — fails only on a window with zero records applied (genuinely stuck), then self-terminates → K8s restart. Not the commit-path barrier timeout.

runtime.http

The built-in HTTP server. See REST API.

KeyTypeDefaultDescription
runtime.http.enabledbooleantrueEnable the HTTP server (health, metrics, info, topology, control endpoints).
runtime.http.portinteger8080Port to bind.
runtime.http.hoststring0.0.0.0Bind address.
runtime.http.backloginteger50Max pending connections in the socket backlog.
runtime.http.debug.enabledbooleantrueRegister the /debug/threads and /debug/barriers diagnostic endpoints. Disable to reduce attack surface in hardened deployments.

runtime.metrics

Micrometer / Prometheus metrics. See Metrics.

KeyTypeDefaultDescription
runtime.metrics.enabledbooleantrueEnable metrics collection and the /metrics Prometheus endpoint.
runtime.metrics.prefixstringstoatflowPrefix for all metric names.
runtime.metrics.recording-levelenum info | debug | traceinfoMetric detail level. info is production-safe; higher levels add cardinality/overhead.
runtime.metrics.common-tagsmap<string,string>{}Tags applied to all metrics (e.g. env, region).
runtime.metrics.bind-jvm-metricsbooleantrueBind JVM metrics (memory, GC, threads).

runtime.endpoints

Visibility of the /info and /config endpoints. See REST API.

KeyTypeDefaultDescription
runtime.endpoints.config.enabledbooleantrueEnable the /config endpoint (merged config with sensitive values masked).
runtime.endpoints.info.show-appbooleantrueInclude application info (applicationId) in /info.
runtime.endpoints.info.show-javabooleantrueInclude Java runtime info in /info.
runtime.endpoints.info.show-kafkabooleantrueInclude Kafka config (bootstrap servers) in /info.
runtime.endpoints.info.show-uptimebooleantrueInclude uptime in /info.
runtime.endpoints.info.show-statebooleantrueInclude state + transition history in /info.
runtime.endpoints.info.show-watermarksbooleantrueInclude watermark info in /info.
runtime.endpoints.info.show-endpointsbooleantrueInclude the list of available endpoints in /info.

runtime.health

Health-check timeouts. See Health checks.

KeyTypeDefaultDescription
runtime.health.kafka-broker.timeout-msinteger2000Timeout for the Kafka broker connectivity check.
runtime.health.schema-registry.timeout-msinteger5000Timeout for the Schema Registry check (auto-enabled when schema-registry-url is set).

logging

Per-package log levels applied at startup (overrides logback.xml).

KeyTypeDefaultDescription
logging.levelmap<string, enum>{}Map of logger name → level (TRACE/DEBUG/INFO/WARN/ERROR/OFF). Use ROOT for the root logger.
logging:
  level:
    ROOT: INFO
    io.stoatflow: DEBUG
    org.apache.kafka: WARN

Example

A representative application.yaml touching the common keys:

stoatflow:
  application-id: order-processor
  bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:-localhost:9092}
  processing-guarantee: EXACTLY_ONCE

  license:
    key: ${STOATFLOW_LICENSE_KEY}
    environment: ${DEPLOY_ENV:-dev}

  lanes:
    count: 16

  state:
    dir: /var/lib/stoatflow/state

  rocks-db:
    preset: DEFAULT

runtime:
  http:
    enabled: true
    port: ${HTTP_PORT:-8080}
  metrics:
    enabled: true
    common-tags:
      env: ${DEPLOY_ENV:-dev}