easy-batch v6.0.0 Release Notes

Release Date: 2020-02-07 // about 4 years ago
  • 🚀 This major release marks a new generation of the framework which is now based on Java 8. It has been an opportunity to improve the framework internals as well as some public APIs. All deprecated APIs in v5.3 and before have been removed. Some APIs have changed in a non-backward compatible way to fix a couple of minor design inconsistencies introduced in the v5 line.

    ⚡️ The root package has been updated from org.easybatch to org.jeasy.batch for consistency with other Jeasy projects. Artifact IDs have also been changed to match the same naming pattern as other projects. Please refer to the migration guide below for more details.

    As you will see in the migration guide, many APIs have been deprecated in previous versions and are now completely removed. As Antoine de Saint-Exupery said:

    "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away"

    🚀 I believe with this release, there is no much more to take away from Easy Batch, but this does not make it perfect! That said, I am very happy and proud to see some serious companies using it in production as well as encouraging feedback from the community. So I would like to thank all contributors who helped making this release possible! Thank you all for your time and efforts! You are awesome 👍

    📚 In addition to dependencies and documentation updates, here are the major highlights for v6.0:

    🆕 New features

    • 👍 Issue #261: Add support for JSON mapping with Yasson (JSON-B RI)
    • 👍 Issue #311: Add support for Java 8 date/time classes
    • Issue #353: Add converters for Java 8 date/time types
    • 👷 Issue #361: Make JobExecutor implement java.lang.AutoCloseable
    • Issue #363: Add batch scanning feature
    • Issue #366: Add formatting option in BeanFieldExtractor

    ✨ Enhancements

    • 👻 Issue #351: FileRecordWriter should not throw an Exception at construction time
    • 🚚 Issue #355: Remove system properties from JobReport#toString
    • 👷 Issue #356: Improve job duration formatting
    • 🔊 Issue #357: Show job duration in the logs
    • 0️⃣ Issue #364: Add default methods in listener interfaces

    🐛 Bug fixes

    • Issue #352: XmlRecordReader should close the input stream
    • 🛠 Issue #365: Incorrect fixed length record marshalling

    🆕 New tutorials

    💥 Breaking changes

    • 🗄 All usages of java.io.File (namely in constructors of all file based record readers/writers) were deprecated in v5.3 and have been replaced with java.nio.file.Path in v6
    • 🚚 Quartz support was deprecated in v5.3 and has been removed in v6. The entire module easybatch-quartz has been removed in v6. This module used to provide two classes that act as a bridge between Easy Batch APIs and Quartz APIs. Those two classes (EasyBatchJob and EasyBatchJobFactory) can now be copied from the Quartz tutorial.
    • 🚀 MongoDB support has been dropped (Issue #354). Please note that this decision was made after releasing v5.3, hence you will not find any @Deprecated annotations on classes of this module in the v5.3 release. Sorry for any inconvenience!
    • 👷 JobListener#beforeJobStart and JobListener#afterJobEnd have been renamed to JobListener#beforeJob and JobListener#afterJob (Issue #362)
    • 👍 Jms reader/writer now work with a JMS Destination instead of Queue to support Topics as well (Issue #359)
    • 👍 The constructor of JmsMessageTransformer now accepts a javax.jms.Session instead of javax.jms.QueueSession to support both queue and topic sessions (Issue #360)
    • 👀 The JmsRecordReader now returns null based on a timeout and not a JmsPoisonMessage anymore (because JmsPoisonMessage has been removed, see "Removed APIs" section of the migration guide)
    • 👀 The BlockingQueueRecordReader now returns null based on a timeout and not a PoisonRecord anymore (because PoisonRecord has been removed, see "Removed APIs" section of the migration guide)
    • 🚚 All EIP related APIs (ContentBasedBlockingQueueRecordWriter, ContentBasedBlockingQueueRecordWriterBuilder, DefaultPredicate, Predicate, RandomBlockingQueueRecordWriter, RoundRobinBlockingQueueRecordWriter) and their JMS equivalent were moved to a new extension module called easy-batch-integration

    Migration guide from v5.3 to v6.0

    Although care has been taken to document all changes in details, a thing or two could have been missed (in which case, apologies upfront).

    Maven coordinates

    • The group id has changed from org.easybatch to org.jeasy
    • ⚡️ Artifact IDs have been updated like follows: easybatch-core -> easy-batch-core (same pattern for other artifacts)

    Here is the new maven dependency for the core module:

     \<dependency\> \<groupId\>org.jeasy\</groupId\> \<artifactId\>easy-batch-core\</artifactId\> \<version\>6.0.0\</version\> \</dependency\>
    

    ✂ Removed APIs

    • 🚚 org.easybatch.xml.XmlWrapperTagWriter was deprecated in v5.3 and has been removed in v6
    • 🚚 org.easybatch.tools.monitoring.CliJobMonitoringListener, org.easybatch.tools.reporting.HtmlJobReportFormatter andorg.easybatch.tools.reporting.JobReportEmailSender were deprecated in v5.3 and have been removed in v6. The entire easybatch-tools module has been removed
    • 🚚 Quartz support was deprecated in v5.3 and has been removed in v6. The entire module easybatch-quartz has been removed in v6
    • 🚀 MongoDB support has been be removed in v6 (See issue #354). Please note that this decision has been made after releasing v5.3, hence you will not find any @Deprecated annotation on classes of this module in the v5.3 release. Sorry for any inconvenience!
    • 🚚 org.easybatch.jms.JmsPoisonMessage, org.easybatch.jms.JmsPoisonRecord, org.easybatch.jms.JmsPoisonRecordBroadcaster and org.easybatch.jms.JmsPoisonRecordFilter were deprecated in v5.3 and have been removed in v6.
    • 🚚 org.easybatch.core.record.PoisonRecord, org.easybatch.core.listener.PoisonRecordBroadcaster and org.easybatch.core.filter.PoisonRecordFilter were deprecated in v5.3 and have been removed in v6.
    • 🚚 The constructor org.jeasy.batch.core.reader.BlockingQueueRecordReader#BlockingQueueRecordReader(java.util.concurrent.BlockingQueue<org.jeasy.batch.core.record.Record>, int) has been removed in v6. Please note that this constructor was not marked with @Deprecated in v5.3 by mistake.
    • 🚚 The constructor BlockingQueueRecordWriter(final List<BlockingQueue<Record>> has been be removed in v6 as this writer now operates on a single blocking queue instead of multiple queues.
    • 🚚 org.easybatch.core.listener.RecordProcessingTimeListener was deprecated in v5.3 and has been removed in v6
    • 🚚 org.easybatch.core.filter.RecordNumberBetweenFilter, org.easybatch.core.filter.RecordNumberEqualToFilter, org.easybatch.core.filter.RecordNumberGreaterThanFilter and org.easybatch.core.filter.RecordNumberLowerThanFilter were deprecated in v5.3 and have been removed in v6
    • 🚚 JobReportFormatter and DefaultJobReportFormatter were deprecated in v5.3 and have been removed in v6
    • 🚚 Constructors that take a delimiter and qualifier in DelimitedRecordMarshaller and ApacheCommonCsvRecordMarshaller have been removed. Use the new setters for these parameters instead.

    🚚 Replaced/Renamed/Moved APIs

    • 🚚 org.easybatch.core.filter.FilteredRecordsSavingRecordFilter was deprecated in v5.3 and has been removed in v6. Use the new org.easybatch.core.filter.FilteredRecordsCollector instead
    • 🚚 org.easybatch.core.filter.StartWithStringRecordFilter was deprecated in v5.3 and has been removed in v6. Use org.easybatch.core.filter.StartsWithStringRecordFilter instead
    • 🚚 org.easybatch.core.filter.EmptyRecordFilter was deprecated in v5.3 and will be removed in v6. Use org.easybatch.core.filter.EmptyStringRecordFilter instead
    • 🚚 org.easybatch.core.filter.EndWithStringRecordFilter was deprecated in v5.3 and will be removed in v6. Use org.easybatch.core.filter.EndsWithStringRecordFilter instead
    • 🗄 Usages of java.util.date (namely in Header class) were deprecated in v5.3 and have been replaced with java.time.LocalDateTime in v6
    • 🗄 Usages of java.io.File (namely in constructors of all file based record readers/writers) were deprecated in v5.3 and have been replaced with java.nio.file.Path in v6
    • 🚚 PayloadExtractor was deprecated in v5.3 and has been removed in v6. Use Utils#extractPayloads instead
    • 🗄 The constructor org.jeasy.batch.extensions.yaml.YamlRecordReader#YamlRecordReader(java.io.InputStream, java.lang.String) has been replaced with one that takes a java.nio.charset.Charset instead of a String for the charset name. Please note that this constructor was not marked with @Deprecated in v5.3 by mistake.
    • 🗄 The constructor org.jeasy.batch.json.JsonRecordReader#JsonRecordReader(java.io.InputStream, java.lang.String) has been replaced with one that takes a java.nio.charset.Charset instead of a String for the charset name. Please note that this constructor was not marked with @Deprecated in v5.3 by mistake.
    • 🚚 org.easybatch.extensions.stream.StreamRecordReader was moved to the core module under org.easybatch.core.reader
    • 🚚 Monitoring APIs (namely JobMonitor and JobMonitorMBean) have been moved from org.jeasy.batch.core.job to org.jeasy.batch.core.jmx
    • 🗄 JpaRecordReader#setFetchSize has been renamed to JpaRecordReader#setMaxResults. Note that this has not been deprecated in v5.3.