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
toorg.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
implementjava.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
- Reading data from a REST endpoint
- Writing a dynamic header/footer to an output file
- Skipping bad records with batch scanning on write failure
๐ฅ 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 withjava.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
andEasyBatchJobFactory
) 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
andJobListener#afterJobEnd
have been renamed toJobListener#beforeJob and JobListener#afterJob
(Issue #362) - ๐ Jms reader/writer now work with a JMS
Destination
instead ofQueue
to supportTopics
as well (Issue #359) - ๐ The constructor of
JmsMessageTransformer
now accepts ajavax.jms.Session
instead ofjavax.jms.QueueSession
to support both queue and topic sessions (Issue #360) - ๐ The
JmsRecordReader
now returnsnull
based on a timeout and not aJmsPoisonMessage
anymore (becauseJmsPoisonMessage
has been removed, see "Removed APIs" section of the migration guide) - ๐ The
BlockingQueueRecordReader
now returnsnull
based on a timeout and not aPoisonRecord
anymore (becausePoisonRecord
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 calledeasy-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
toorg.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 entireeasybatch-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
andorg.easybatch.jms.JmsPoisonRecordFilter
were deprecated in v5.3 and have been removed in v6. - ๐
org.easybatch.core.record.PoisonRecord
,org.easybatch.core.listener.PoisonRecordBroadcaster
andorg.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
andorg.easybatch.core.filter.RecordNumberLowerThanFilter
were deprecated in v5.3 and have been removed in v6 - ๐
JobReportFormatter
andDefaultJobReportFormatter
were deprecated in v5.3 and have been removed in v6 - ๐ Constructors that take a delimiter and qualifier in
DelimitedRecordMarshaller
andApacheCommonCsvRecordMarshaller
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 neworg.easybatch.core.filter.FilteredRecordsCollector
instead - ๐
org.easybatch.core.filter.StartWithStringRecordFilter
was deprecated in v5.3 and has been removed in v6. Useorg.easybatch.core.filter.StartsWithStringRecordFilter
instead - ๐
org.easybatch.core.filter.EmptyRecordFilter
was deprecated in v5.3 and will be removed in v6. Useorg.easybatch.core.filter.EmptyStringRecordFilter
instead - ๐
org.easybatch.core.filter.EndWithStringRecordFilter
was deprecated in v5.3 and will be removed in v6. Useorg.easybatch.core.filter.EndsWithStringRecordFilter
instead - ๐ Usages of
java.util.date
(namely inHeader
class) were deprecated in v5.3 and have been replaced withjava.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 withjava.nio.file.Path
in v6 - ๐
PayloadExtractor
was deprecated in v5.3 and has been removed in v6. UseUtils#extractPayloads
instead - ๐ The constructor
org.jeasy.batch.extensions.yaml.YamlRecordReader#YamlRecordReader(java.io.InputStream, java.lang.String)
has been replaced with one that takes ajava.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 ajava.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 underorg.easybatch.core.reader
- ๐ Monitoring APIs (namely
JobMonitor
andJobMonitorMBean
) have been moved fromorg.jeasy.batch.core.job
toorg.jeasy.batch.core.jmx
- ๐
JpaRecordReader#setFetchSize
has been renamed toJpaRecordReader#setMaxResults
. Note that this has not been deprecated in v5.3.