#Batch
7 posts
-
Spring Batch 6 Guide Capstone: Marketplace Analytics Pipeline — ETL · KPI Aggregation · K8s CronJob
The capstone that gathers Spring Batch 6 series Parts 1–6 into one pipeline, on Spring Boot 4 + Kotlin 2.3 + PostgreSQL 16. A daily-etl that moves yesterday's orders from the operational marketplace schema to the analytics schema, plus daily-kpi and monthly-kpi that aggregate on top — all on one PostgreSQL 16 instance split by two datasources. Partition the ETL (Part 5), keep re-runs safe with idempotent upsert (Part 3), and operate it with observability and K8s CronJob (Part 6) — written in idiomatic Kotlin without Lombok. Series capstone.
-
Spring Batch 6 Guide Part 6: Observability · Testing · Deployment — Micrometer · @SpringBatchTest · Testcontainers · K8s CronJob
How to observe, test, and deploy Spring Batch 6 jobs on Spring Boot 4 + Kotlin 2.3 + PostgreSQL 16. The six auto-registered Micrometer metrics and Prometheus exposure, structured logging that stamps jobName/stepName/chunkIndex onto every log line via MDC, the test pyramid / four annotations / five test doubles recapped self-contained in batch context, verifying slices, full jobs, and restart with @SpringBatchTest and JobLauncherTestUtils, why you test against Testcontainers PostgreSQL 16 instead of H2, and a Java 21 multi-stage Dockerfile plus a K8s CronJob — written in idiomatic Kotlin without Lombok. Series Part 6.
-
Spring Batch 6 Guide Part 5: Performance · Parallelism — Multi-thread · Partitioning · Remote Workers · Virtual Threads
How to run Spring Batch 6 jobs faster on Spring Boot 4 + Kotlin 2.3 + PostgreSQL 16. The Reader-concurrency and restart traps when moving from single- to multi-threaded Steps, partitioning that splits data by key range so each partition gets an independent StepExecution, the difference between remote partitioning and remote chunking, where JDK 21 virtual threads shine for IO-bound jobs and the connection-pool ceiling, and a one-million-row benchmark comparing the four approaches — written in idiomatic Kotlin without Lombok. Series Part 5.
-
Spring Batch 6 Guide Part 4: Job Launch · Scheduling · Operations — Triggers · Idempotent Parameters · Data Sources
How to run and operate Spring Batch 6 jobs on Spring Boot 4 + Kotlin 2.3 + PostgreSQL 16. The division of labor between JobLauncher and JobOperator, a decision tree for triggering with @Scheduled / Quartz / K8s CronJob / Argo, JobParameters idempotency-key design and the incrementer trade-off, controlling restart of failed jobs, Actuator/Micrometer-based operational monitoring, stopping the same job from running twice across multiple instances, and the five patterns for where a batch reads its data (same DB · API · Read Replica · analytics Warehouse · CDC) — written in idiomatic Kotlin without Lombok. Series Part 4.
-
Spring Batch 6 Guide Part 3: Transactions · Failure Handling — Skip · Retry · Restart
Transactions and failure handling in Spring Batch 6 on Spring Boot 4 + Kotlin 2.3 + PostgreSQL 16. What rolls back and what survives when one item fails inside a chunk, how to design the fault-tolerant Step's Skip · Retry · NoRollback policies by exception meaning, the item-by-item re-processing (scan) trap that Skip introduces, a catalog of the six listeners, how ExecutionContext preserves the restart position, and finally JobParameters idempotency keys plus PostgreSQL upsert — written in idiomatic Kotlin DSL without Lombok. Series Part 3.
-
Spring Batch 6 Guide Part 2: Chunk-Oriented Processing — Reader · Processor · Writer
Chunk-oriented processing in Spring Batch 6 on Spring Boot 4 + Kotlin 2.3 + PostgreSQL 16. From the read N → process N → write N → commit cycle as the transaction boundary, through the six ItemReader implementations and how to choose, ItemProcessor patterns for transform/filter/composite, JpaItemWriter vs JdbcBatchItemWriter trade-offs, the PostgreSQL ON CONFLICT idempotency pattern, and the most-confused topic — chunk size vs page size — written in idiomatic Kotlin DSL without Lombok. Series Part 2.
-
Spring Batch 6 Guide Part 1: Job · Step · Metadata Identity — Spring Boot 4 · Kotlin 2.3
Spring Batch 6 entry-level on Spring Boot 4 + Kotlin 2.3 + PostgreSQL 16. Defining the vocabulary (Job, Step, JobInstance, JobExecution), the six JobRepository metadata tables, your first Hello Tasklet, and the 5.x → 6.x migration essentials (Jakarta EE 10, Java 17 baseline, @EnableBatchProcessing auto-activation) — written in idiomatic Kotlin DSL without Lombok. Series Part 1.