Spring Team
Mahmoud Ben Hassine

Mahmoud Ben Hassine

Spring Batch committer

Brussels, Belgium

Mahmoud is a passionate software engineer with 10+ years of experience in enterprise software development. He is an open source advocate and has contributed to several open source projects. When he is not coding, Mahmoud enjoys spending time with his family and friends, running and playing chess!
Blog Posts by Mahmoud Ben Hassine

Spring Batch 4.2.0.RC1 is released!

On behalf of the Spring Batch team, I am pleased to announce the release of Spring Batch 4.2.0.RC1. We have been working on some performance improvements in the core framework, and this post highlights the major changes.

Major Performance Improvements

We have made some performance improvements, including:

Enhanced Step Partitioning

Starting a partitioned step is an area where the framework wasn’t well optimized. In this version, we have dug deep into the partitioning process to figure out the root cause of this performance issue. One of the main steps of the partitioning process is to find the last step execution (to see if the current execution is a restart). We found that looking up the last step execution involved loading all step executions from all job executions for a given job instance in-memory, which is obviously inefficient!

Read more...

Spring Batch 4.2.0.M2 available now!

I am pleased to announce that Spring Batch 4.2.0.M2 is available now from our milestone repository.

What’s new?

This release adds a new item reader and a new item writer for Apache Kafka:

  • KafkaItemReader can read messages from a single partition or multiple partitions of the same topic. This reader stores message offsets in the ExecutionContext to support restart.
  • KafkaItemWriter uses a KafkaTemplate from the Spring for Apache Kafka project to send messages to a given topic.

I would like to thank Mathieu Ouellet for his amazing contribution in adding support for Apache Kafka in Spring Batch!

Read more...

Spring Batch 4.2.0.M1 available now

I am pleased to announce that the first milestone of Spring Batch 4.2 has been released and is available from our milestone repository.

The major feature of this release is the addition of batch metrics with Micrometer.

Batch Metrics with Micrometer

This release introduces a new feature that lets you monitor your batch jobs by using Micrometer. By default, Spring Batch collects metrics (such as job duration, step duration, item read and write throughput, and others) and registers them in Micrometer’s global metrics registry under the spring.batch prefix. These metrics can be sent to any monitoring system supported by Micrometer.

Read more...

Spring Batch 4.1.1, 4.0.2, and 3.0.10 available now

We are pleased to announce that Spring Batch 4.1.1, 4.0.2, and 3.0.10 are available from repo.spring.io and Maven Central.

These releases contain security and bug fixes as well as dependencies updates. We recommend users upgrade to one of these versions. Please find the change log for each version in the following links: 4.1.1 | 4.0.2 | 3.0.10

As we announced earlier, please note that v3.0.10 is the last planned release for the 3.x line, so we highly recommend users to upgrade to the latest possible version.

Read more...

Spring Batch 4.1 goes GA!

I am pleased to announce that Spring Batch 4.1.0.RELEASE is now available.

What’s New in Spring Batch 4.1 GA

This release adds the following features:

  • A new @SpringBatchTest annotation to simplify testing batch components
  • A new @EnableBatchIntegration annotation to simplify remote chunking and partitioning configuration
  • Support for reading and writing data in JSON format
  • Support for validating items with the Bean Validation API
  • Support for JSR-305 annotations
  • Enhancements to the FlatFileItemWriterBuilder API
Read more...

Spring Batch 4.1.0.RC1 is now available

On behalf of the Spring Batch team, I’m pleased to announce that Spring Batch 4.1.0.RC1 is now available on Github and the Pivotal download repository.

What’s new?

In this release, we worked mainly on making Spring Batch build and run correctly on Java 8, 9, 10 and 11! This release is based on Spring Framework 5.1 GA as well as the latest versions of Spring Integration, Spring AMQP and Spring Data. For a complete list of changes, please refer to the change log.

What’s next?

Our plan is to release Spring Batch 4.1 GA by the end of October right in time for Spring Boot 2.1 GA. The focus will be on making this release candidate as stable as possible so please help us by testing new features and submitting your feedback on JIRA, StackOverflow or Gitter. You can consume Spring Batch 4.1.0.RC1 with Spring Boot 2.1.0.M4.

Read more...

Spring Batch 4.1.0.M3 Released!

We are pleased to announce that Spring Batch 4.1.0.M3 is now available on Github and the Pivotal download repository. What’s new in this milestone? Here is a list of new features and enhancements:

JSR-305 support

The main theme of this milestone is adding support for JSR-305 annotations. We leveraged Spring Framework’s Null-safety annotations and added them where appropriate in all public APIs of Spring Batch.

These annotations will not only enforce null-safety when using Spring Batch APIs, but also can be used by IDEs to provide useful information related to nullability. For example, if a user wants to implement the ItemReader interface, any IDE supporting JSR-305 annotations will generate something like:

Read more...

Spring Batch 4.1.0.M2 Released

We are pleased to announce that Spring Batch 4.1.0.M2 is now available on Github and the Pivotal download repository. Many thanks to all of those who contributed to this release!

What’s new?

Here are the highlights of this release:

  • Simplify remote partitioning
  • Add a new JSON item writer
  • Add support for validating items with the Bean Validation API

Simplify remote partitioning

In the 4.1.0.M1 release, we created new APIs to simplify the configuration of a remote chunking step. In this milestone, we continued this effort to simplify remote partitioning through two new builders: RemotePartitioningMasterStepBuilder and RemotePartitioningWorkerStepBuilder.

Read more...

Spring Batch 4.1.0.M1 Released

We are pleased to announce that Spring Batch 4.1.0.M1 is now available on Github and the Pivotal download repository. Many thanks to all of those who contributed to this release!

What’s new?

Here are the highlights of this release:

  • Simplify testing
  • Simplify remote chunking
  • Add a new JSON item reader

Simplify Testing

Spring Batch provides some nice utility classes (such as the JobLauncherTestUtils and JobRepositoryTestUtils) and test execution listeners (StepScopeTestExecutionListener and JobScopeTestExecutionListener) to test batch components. However, in order to use these utilities, you must configure them explicitly, as shown in the following example:

Read more...

Spring Batch 3.0.9.RELEASE and 4.0.1.RELEASE are now available

We are pleased to announce the release of Spring Batch 3.0.9.RELEASE and 4.0.1.RELEASE via Maven Central, Github, and the Pivotal download repository.

These two maintenance releases address a number of bug fixes, enhancements and documentation updates. For a complete list of changes, please refer to the change logs for 3.0.9 and 4.0.1. Many thanks to all of those who submitted pull requests that went into these releases.

Please note that the next patch version, 3.0.10.RELEASE, will be the last maintenance release of the 3.x line. We strongly recommend users to migrate to the latest and greatest Spring Batch 4 (now available via Spring Boot 2).

Read more...