How do you manage distributed transactions with Spring Boot and JMS?
Learn when to use XA/JTA and when the transactional outbox pattern with idempotent consumers is the safer way to keep a database and JMS in sync.
2,889 posts about Java: questions with answers, tutorials and articles, newest first.
Learn when to use XA/JTA and when the transactional outbox pattern with idempotent consumers is the safer way to keep a database and JMS in sync.
Compare JMS selectors with Spring Integration routers and build header-based, content-based and fan-out routing flows in a Spring Boot 3 application.
Quorum queues are a RabbitMQ feature used through Spring AMQP. Artemis has no equivalent type, so JMS users rely on replicated live/backup HA.
JMS delivers messages at least once. Learn how acknowledgement modes, message IDs and a unique-key table make a Spring Boot listener safe against duplicates.
Set JMS time-to-live correctly in Spring Boot, handle expired messages, and avoid the ineffective JMS_TTL property.
Cap broker memory, handle blocked producers and tune prefetch, pooling and listener concurrency so Spring Boot JMS applications stay stable under load.
JMS routes on properties and message selectors, not header exchanges. See how to set and filter them in Spring Boot, plus the AMQP headers exchange alternative.
Model conditional, branching and parallel Spring Batch flows with exit-status transitions, a JobExecutionDecider and split, using the Batch 5 builders.
Use a JobExecutionDecider or exit-status transitions to branch a Spring Batch job at runtime, with working Spring Batch 5 code for Spring Boot 3.
Branch and orchestrate Spring Batch jobs with conditional transitions, a JobExecutionDecider, parallel flows and clear end, fail and stop behaviour.
Set up two DataSource beans, pick the batch metadata database and copy rows between MySQL and PostgreSQL with a Spring Batch 5 chunk step.
Implement ItemReader and ItemWriter, then wire them into a chunk step with JobBuilder and StepBuilder. Covers Spring Batch 5, restartability and skip handling.
Process millions of rows with Spring Batch 5: chunked steps, paging readers, fault tolerance and scaling with partitioning, using the current JobBuilder API.
Spring Batch commits one transaction per chunk. Learn to set commit intervals, pass the transaction manager, handle rollback with skip and retry, and tune tasklets.
Build a Spring Batch job on Spring Data JPA in Spring Boot 3, with paging readers, JPA writers, chunk transactions and fixes for common pitfalls.
Scale Spring Batch beyond one JVM with remote partitioning or chunking, a shared job repository and a broker, and make the workers safe to retry.
Run Spring Batch jobs as container tasks, read cloud storage via Spring Resource, keep job metadata in a managed database and scale out with partitioning.
Pass job parameters to Spring Batch from the command line or JobLauncher and read them with StepScope late binding, using the Spring Batch 5 API in Spring Boot 3.
Read and maintain Spring Batch job history with JobExplorer and SQL, configure the repository schema in Spring Boot, and plan retention for the metadata tables.
Route steps by exit status, branch at runtime with a JobExecutionDecider, run flows in parallel with split, and finish branches with end, fail or stop.