easy-batch v6.0.0 Release Notes

Release Date: 2020-02-07 // almost 5 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.