# Article: Distributed Spring Batch Without a Message Broker

DevFeed: [Article: Distributed Spring Batch Without a Message Broker](<https://devfeed.tech/articles/article-distributed-spring-batch-without-a-message-broker-92532.md>)

Original publisher: [Read original article](<https://www.infoq.com/articles/spring-batch-without-broker/>)

Author: Janardhan Reddy Chejarla

Published: 2026-10-21T09:00:00Z

Content type: article

Language: en

Sources: [InfoQ](<https://devfeed.tech/sources/infoq.md>)

Topics: [Spring Framework](<https://devfeed.tech/topics/spring-framework.md>), [control-plane](<https://devfeed.tech/topics/control-plane.md>), [RabbitMQ](<https://devfeed.tech/topics/rabbitmq.md>), [Apache Kafka](<https://devfeed.tech/topics/apache-kafka.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [architecture-design](<https://devfeed.tech/tags/architecture-design.md>), [article](<https://devfeed.tech/tags/article.md>), [batch](<https://devfeed.tech/tags/batch.md>), [batch-processing](<https://devfeed.tech/tags/batch-processing.md>), [broker](<https://devfeed.tech/tags/broker.md>), [choice](<https://devfeed.tech/tags/choice.md>), [compare](<https://devfeed.tech/tags/compare.md>), [data-partitioning](<https://devfeed.tech/tags/data-partitioning.md>), [database](<https://devfeed.tech/tags/database.md>), [development](<https://devfeed.tech/tags/development.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [enterprise-architecture](<https://devfeed.tech/tags/enterprise-architecture.md>), [execution](<https://devfeed.tech/tags/execution.md>), [failover](<https://devfeed.tech/tags/failover.md>), [java](<https://devfeed.tech/tags/java.md>), [job](<https://devfeed.tech/tags/job.md>), [live](<https://devfeed.tech/tags/live.md>), [master](<https://devfeed.tech/tags/master.md>), [message-broker](<https://devfeed.tech/tags/message-broker.md>), [messaging](<https://devfeed.tech/tags/messaging.md>), [needs](<https://devfeed.tech/tags/needs.md>), [node](<https://devfeed.tech/tags/node.md>), [partitioning](<https://devfeed.tech/tags/partitioning.md>), [performance](<https://devfeed.tech/tags/performance.md>), [repository](<https://devfeed.tech/tags/repository.md>), [right](<https://devfeed.tech/tags/right.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [soa](<https://devfeed.tech/tags/soa.md>), [spring](<https://devfeed.tech/tags/spring.md>), [spring-batch](<https://devfeed.tech/tags/spring-batch.md>), [spring-batch-without-broker](<https://devfeed.tech/tags/spring-batch-without-broker.md>)

## AI overview

Spring Batch can coordinate distributed partitions through its existing shared, persistent relational database, removing the need for a broker in small-to-medium clusters. A custom `PartitionHandler` stores partition state in SQL; the job-launching node acts as master for that execution, sizes work to live nodes, and workers claim assigned partitions with guarded compare-and-set updates. Heartbeats drive two-phase failure handling: stale nodes first become unreachable, then are removed after a grace period, with incomplete work reassigned only when marked transferable. Transferable work may run at least once and must be idempotent; nontransferable work is failed rather than moved. This trades away runtime pull-based rebalancing and makes the database a critical dependency subject to contention. The article places the approach around two to twenty nodes, recommending a broker for many dozens of nodes, sub-second coordination, or workloads that fit existing broker delivery semantics. Master loss requires fail-and-restart, not in-place resumption.

## Source excerpt

Distributed Spring Batch partitioning already needs a shared, persistent job repository. This article makes that database the whole coordination plane and drops the message broker, sizing work to the live node count, a per-job master with no standing coordinator, compare-and-set claiming that prevents double-execution, two-phase heartbeat failover, and where a broker is still the right choice. By Janardhan Reddy Chejarla