Skip to content

Release 3.4.0-KZM-3.4

Latest

Choose a tag to compare

@oleksandr-kazimirov oleksandr-kazimirov released this 24 Jul 14:23
e60d778

Feature release. Headline: Kafka record headers, end-to-end - functions can finally read and write Kafka headers, a gap upstream Apache StateFun never closed.

Kafka record headers

Remote functions built with statefun-sdk-java can now:

  • Read the headers of the Kafka record that invoked them via Message#headers() - order and duplicate keys preserved, values decodable as raw bytes, UTF-8 text, typed primitives (valueAsInt() and friends), or any SDK Type<T>.
  • Write headers on egress records through the KafkaEgressMessage builder - withUtf8Header, raw byte[]/Slice, Type<T>, and binary primitive shorthands (withHeader("retry-count", 10) sends a real binary int).

Design points worth knowing:

  • Kafka-exact null semantics. Kafka distinguishes a null header value from an empty one; so do we. Null survives the full ingress → function → egress round-trip. Header operations never throw on production paths - null values are preserved, null keys degrade to empty, undecodable values read as null.
  • Opt-in per topic. Ingress header forwarding is off by default. Enable it with forwardHeaders at ingress level or per topic (per-topic wins). Topics that don't opt in never capture header bytes; header-less records cost nothing extra anywhere.
  • Additive protocol. New protobuf fields only - old SDKs work against the new runtime and vice versa. No lockstep upgrade, no savepoint impact.
  • Function-to-function headers ride along for free (MessageBuilder has the same API), and MessageBuilder.fromMessage now preserves headers when forwarding.
  • Testing toolkit: build header-carrying messages with MessageBuilder, assert egress output with the new testing.KafkaEgressCapture.

Docs: Kafka record headers guide · design write-up

Also in this release

  • Security: image CVE batch cleared - netty-bom 4.1.135.Final, jackson-bom 2.18.8, Flink 2.2.0 → 2.2.1 (flink-table-planner + base-image openssl CVEs), lz4-java convergence pin, completed logback migration.
  • Flink Kubernetes Operator 1.11 → 1.15, FlinkDeployment CRs on flinkVersion: v2_2.
  • CI hardening: Trivy image scan on PRs and releases with published reports, weekly CVE-scan tracking issues.
  • Dependency refresh across the board (AWS SDK BOM 2.49.1, JUnit BOM 6.1.2, Maven plugins, GitHub Actions).

Coordinates

<dependency>
  <groupId>io.github.kzmlabs.flinkstatefun</groupId>
  <artifactId>statefun-sdk-java</artifactId>
  <version>3.4.0-KZM-3.4</version>
</dependency>
docker pull ghcr.io/kzmlabs/flink-statefun:3.4.0-KZM-3.4

Full changelog: https://github.com/kzmlabs/flink-statefun/blob/release/CHANGELOG.md