Migration Notes - 2.2.2
This page explains the changes required to migrate to the 2.2.3-AP5.10 version of Data-Connectors.
Migrate to 2.2.3 Overview
No migration needed.
Migrate to 2.2.2 Overview
Use the new DlcMessageHandler
class with your CSV IMessageChannel
in your CSV Source Config.
Additionally, a new method formatRawOutput has been added to IOutputHandler
to allow for formatting N/A values to empty for SearchFactsQueries. This method is used to format raw rows of data.
Message Handler Changes
If an exception is thrown during tuple publishing, by default, the IMessageChannel
created from a CSVMessageChannelFactory
logs the exception, but doesn’t notify the DLC. Because of this, the DLC responds with a successful status rather than a failure status.
To notify the DLC when an exception occurs, a DlcMessageHandler
needs to be added to the IMessageChannel
created from the CSVMessageChannelFactory
.
For more information on these changes and customizations, see CSV Message Handlers.
There are two ways to implement this:
DlcCSVMessageChannelFactory
Using the new DlcCSVMessageChannelFactory
to create your IMessageChannel
is preferred, as it adds a layer of protection to guarantee that only a DlcMessageHandler
or implementing class is used with the created channel.
The DlcCSVMessageChannelFactory
extends the CSVMessageChannelFactory
and creates a DlcStoreMessageChannel
. The DlcStoreMessageChannel
’s IMessageHandler
is a DlcMessageHandler
by default. Trying to set the message handler on the DlcStoreMessageChannel
will throw an exception if it is not an instance of DlcMessageHandler
.
This way you can simply replace your instances of CSVMessageChannelFactory
with DlcCSVMessageChannelFactory
.
DlcMessageHandler
If you cannot use a DlcCSVMessageChannelFactory
, you must ensure that you add an implementation of the DlcMessageHandler
to the DlcCSVMessageChannelFactory's
created IMessageChannel
by passing an implementation of the DlcMessageHandler
to IMessageChannel.withMEssageHandler()
.
Please read the CSV Message Handlers section for more information on extending and implementing you own custom DlcMessageHander
.