Resilient Scheduling for Low-Frequency Spring Batch Jobs
Learn how to run daily, weekly or monthly Spring Batch jobs reliably with idempotent parameters, retry and skip, restartability, catch-up runs and alerting.
2,882 posts about Java: questions with answers, tutorials and articles, newest first.
Learn how to run daily, weekly or monthly Spring Batch jobs reliably with idempotent parameters, retry and skip, restartability, catch-up runs and alerting.
Use listeners, metrics and a watchdog to detect Spring Batch failures immediately, including crashed processes and runs that never started.
Make a weekly or monthly Spring Batch job recover from failures with retry, skip, restart from the last committed chunk, and failure alerts.
Spring Batch has no built-in predictive recovery. Combine small idempotent chunks, retry, adaptive skip policies and metrics to detect and recover from faults fast.
Detect skipped records, retries, slow, missing and stuck runs in high-frequency Spring Batch jobs, and stop a step when its error rate is too high.
Prevent overlapping runs, bound slow calls with timeouts, parallelize I/O and recover crashed executions in high-latency Spring Batch jobs.
Trigger a nightly or weekly Spring Batch job with a zone-aware cron expression, unique job parameters and a decider that skips runs when no new data exists.
Spring Batch is near-real-time at best. See how to schedule frequent, bounded runs with fixedDelay, avoid overlap and know when to switch to streaming.
Design restartable, idempotent steps and set retry, skip and quarantine rules per failure type for reliable Spring Batch recovery.
Add spring-kafka, configure the consumer group, write a @KafkaListener, and handle JSON, offsets and failures with a dead-letter topic.
Kafka brokers cannot filter records, so consumers must. Compare consumer-side checks, Spring Kafka RecordFilterStrategy and Kafka Streams with examples.
csrf().disable() turns off Spring Security CSRF protection. See when it is safe, when it is not, and the Spring Security 6 lambda syntax.
Spring has no CacheableCondition interface. Conditional caching uses the condition and unless attributes of @Cacheable, shown here with examples.
Configure MongoTransactionManager on a replica set and use @Transactional or TransactionTemplate for multi-document ACID transactions in Spring Data MongoDB.
Connect Spring Boot to MongoDB, Redis or Cassandra with Spring Data starters, model data for each store and test with Testcontainers.
The Liquibase changelog is the ordered record of every schema change. Learn how changesets, checksums and DATABASECHANGELOG keep databases in sync.
Set up Liquibase in Spring Boot, write immutable changesets, understand checksums and the changelog tables, and manage environments with contexts and rollback.
Add flyway-core and a database module, place V1__ scripts in db/migration, and Spring Boot applies them at startup. This guide covers properties, baselining and production safety.
Flyway and Liquibase apply versioned schema migrations and track them in a history table. Compare both tools and set them up in Spring Boot.
Spring Boot runs Flyway or Liquibase migrations at startup. See how to set up each, compare them, and apply safe schema changes in production.