Migration Notes - 2.2.2

This page explains the changes required to migrate to the 2.2.2-AP5.10 version of Data-Connectors.


Migrate to 2.2.2 Overview

You should 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 will only log the exception and the DLC will not be notified of the exception. Because of this the DLC will respond back with a successful status rather than a failure status.

To allow for the DLC to be notified when an exception is thrown a DlcMessageHandler needs to be added to the IMessageChannel created from the CSVMessageChannelFactory.

More on these changes and customizations can be found in the CSV Message Handlers section.

There are two ways to implement this:


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 who’s IMessageHandler is a DlcMessageHandler by default. Trying to set the message handler on the DlcStoreMessageChannel will throw an exception if is not an instance of DlcMessageHandler.

This implementation is easy to implement as you can simply replace your instances of CSVMessageChannelFactory with DlcCSVMessageChannelFactory.


If you cannot use a DlcCSVMessageChannelFactory then 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.