The Bootstrapping & Reliability Framework for Apache Flink. Fail fast on configuration, serialize natively without Kryo, and bootstrap stream pipelines with zero boilerplate.
Built by developers who felt the pain.
We’ve lived through the midnight outages, fragile boilerplate, and endless configuration headaches so you don't have to. Flinkboot is our free, open-source gift to the Flink community, crafted with care to make stream processing enjoyable again.
Flinkboot is a comprehensive, production-grade development and reliability framework designed to bootstrap, configure, and secure Apache Flink applications with zero boilerplate.
In standard Flink deployments, misconfigurations, missing parameters, state backend errors, and silent fallbacks to slow Kryo serialization often go unnoticed until runtime, leading to costly cluster failures or degraded pipeline throughput. Flinkboot eliminates these risks before your code ever reaches the TaskManagers:
public static void main(String[] args) throws Exception {
// 1. Manual YAML parsing with Jackson (untyped tree navigation, zero validation, fails on first missing key)
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
JsonNode yaml = mapper.readTree(new File("job-configuration.yaml"));
String brokers = yaml.get("kafka").get("brokers").asText();
String topic = yaml.get("kafka").get("topic").asText();
long checkpointInterval = yaml.get("checkpoint").get("interval").asLong();
// 2. Imperative environment setup (hardcoded: adding Web UI, latency tracking, or unaligned checkpoints requires code change & redeployment)
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.enableCheckpointing(checkpointInterval);
env.getCheckpointConfig().setCheckpointTimeout(60000L);
env.setStateBackend(new EmbeddedRocksDBStateBackend(true));
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(3, Time.seconds(10)));
// 3. Rigid manual connector builder (unverified OrderEvent could silently fall back to slow Kryo)
KafkaSource<OrderEvent> source = KafkaSource.<OrderEvent>builder()
.setBootstrapServers(brokers)
.setTopics(topic)
.setGroupId("order-service")
.setStartingOffsets(OffsetsInitializer.latest())
.setDeserializer(new OrderEventDeserializationSchema())
.build();
env.fromSource(source, WatermarkStrategy.noWatermarks(), "kafka-source").print();
env.execute("LegacyJob");
// ... and it would take 400+ lines of imperative boilerplate just to cover all execution environment settings
// (RocksDB tuning, restart strategies, unaligned checkpoints, latency metrics, savepoint restore, local web UI...)
// Not to mention hundreds more for multi-source YAML merging, ${ENV} interpolation, and fail-fast validation.
}// 1. Build-time guarantee in unit tests: fails build if OrderEvent could fall back to slow Kryo
@Test
void verifyPojoCompliance() {
FlinkbootAssertions.assertThat(OrderEvent.class).isPojo();
}
// 2. User-defined composed configuration (record or class): assemble independent blocks like Legos
public record AppConfiguration(
// 100% validated fail-fast & covers every Flink environment setting (RocksDB, restart, checkpoints...)
@Valid @NotNull @JsonProperty("job") JobProperties job,
// 100% validated fail-fast & exhaustively covers the connector options with raw escape hatch
@Valid @NotNull @JsonProperty("kafka-source") KafkaSourceProperties kafkaSource
) {}
public class MyFlinkJob {
public static void main(String[] args) throws Exception {
// Loads & merges multi-source YAML with full fail-fast Jakarta validation (catches all errors at once)
Flinkboot boot = Flinkboot.initialize(args);
AppConfiguration config = boot.configuration(AppConfiguration.class);
// 1-line setup fully configuring RocksDB, checkpointing, restart strategy, local Web UI, and latency tracking
StreamExecutionEnvironment env = boot.executionEnvironment(config.job());
// Pre-configured, production-ready Kafka source with operator-level properties escape hatch
KafkaSource<OrderEvent> source = KafkaSourceFactory.supplyFor(
config.kafkaSource(),
new OrderEventDeserializationSchema()
);
env.fromSource(source, WatermarkStrategy.noWatermarks(), config.kafkaSource().name()).print();
env.execute(config.job().name());
}
}- Unified Configuration Loading — Parse and merge multiple YAML files, CLI arguments, and environment variables into immutable Java records.
- Fail-Fast Validation — Catch missing parameters, invalid ranges, and syntax errors on the JobManager before resources are allocated.
- Declarative Execution Environment — Configure and instantiate Flink's
StreamExecutionEnvironmentwith zero boilerplate. - Native JDK Type Serialization — Built-in
@TypeInfofactories forDuration, Java 8 time types, and generic collections without Kryo fallback. - Deep POJO Compliance Verification — Test utility (
FlinkbootAssertions.assertThat(...).isPojo()) to recursively verify that data models serialize natively without Kryo. - Testing Helpers — Load and validate configurations directly in JUnit 5 tests.
- Unified Resource Loading — Load files and assets seamlessly across classpath and file systems with a unified URI syntax (
Resource.of). - Auto-configured Connectors — Production-ready sources and sinks (e.g. Apache Kafka, Apache Fluss) built directly from configuration.
Follow these 3 essential steps to get started with Flinkboot:
-
Setup POM & Avoid Conflicts (MUST READ)
Configure your project's Maven POM, BOM dependencies, and shading relocations to prevent Jackson/Log4j runtime conflicts on your Flink cluster. -
Configure Your Jobs (Load & Merge Configurations)
Define your YAML configurations (defaults toclasspath:job-configuration.yaml), load them into strongly-typed Java models, and apply CLI/environment overrides. -
Create an Execution Environment
Configure execution modes, checkpointing, restart strategies, and RocksDB state backends to instantiate Flink'sStreamExecutionEnvironmentwith zero boilerplate.
Note
Version-Specific Documentation: The documentation on the main branch tracks the latest development version. If you are using a specific release of Flinkboot, please switch to the corresponding Git tag (e.g. v0.5.0-1.20) to ensure the guides and API references match your exact version.
- How-To Guides Index — Step-by-step guides for configurations, connectors, POJO compliance, and testing.
- Compatibility Matrix — Supported Apache Flink versions and Java (JDK) runtimes.
- Contributing Guide — Guidelines for reporting issues, submitting pull requests, and coding standards.
- Changelog — Release notes and user-facing change history.
Every bug fix, test addition, and architectural improvement from the community makes Flinkboot more reliable for everyone running Flink in production.
Sincere appreciation to all contributors who have shaped and strengthened this codebase.
Apache®, Apache Flink®, Apache Kafka®, and Apache Fluss™ are trademarks of the Apache Software Foundation. Flinkboot is an independent open-source project and is not affiliated with, endorsed by, or sponsored by the Apache Software Foundation.











