Being the C++ class library, the Handler uses exceptions to report about an error occurred while performing a certain action. For example, the Handler will raise a regular exception to report about the inability to connect to the Multicast Price Feed server or about failure in login procedure. However, once subscribing to market data is succeeded, the Handler is not able to report about any further errors since it performs all handling asynchronously on a background. For this reason, the Handler exposes OnixS::ICE::iMpact::MarketData::ErrorListener
interface and OnixS::ICE::iMpact::MarketData::Handler::registerErrorListener
member to be able to subscribe to and handle errors.
Once instance of OnixS::ICE::iMpact::MarketData::ErrorListener
is assigned to the Handler, it will invoke OnixS::ICE::iMpact::MarketData::ErrorListener::onError
member each time error occurs. OnixS::ICE::iMpact::MarketData::ErrorListener::onError
member has couple of input parameters which define code (identifier) of error and human-readable explanation or description of the error.
OnixS::ICE::iMpact::MarketData::KnownErrors
type contains constants and descriptions for the errors which may occur while processing market data from Multicast Price Feed.
Error Code | Possible Causes |
---|---|
OnixS::ICE::iMpact::MarketData::KnownErrors::Nothing | This indicates that no error has occurred. Default value. |
OnixS::ICE::iMpact::MarketData::KnownErrors::Generic | A general, non-specific error occurred. This could be due to various reasons such as unexpected conditions, or unknown issues in the system. |
OnixS::ICE::iMpact::MarketData::KnownErrors::NotLicensed | This error happens when there is no valid license available, or the license has expired. |
OnixS::ICE::iMpact::MarketData::KnownErrors::BadConfiguration | The configuration settings for the Handler are incorrect or incomplete. This might include invalid parameters, or missing required fields. |
OnixS::ICE::iMpact::MarketData::KnownErrors::BadPacket | The network packet received by the Handler is corrupted, possibly due to transmission errors, network issues, or interference during data transfer. |
OnixS::ICE::iMpact::MarketData::KnownErrors::BadMessage | The structure of the message is invalid, which might be due to a malformed message format, missing fields, or unexpected values. |
OnixS::ICE::iMpact::MarketData::KnownErrors::MarketTypeIsNotPermitted | Signals an attempt to subscribe to a market type that is not allowed for the user's credentials. |
OnixS::ICE::iMpact::MarketData::KnownErrors::LogReplayFailure | The system encountered an irrecoverable error while attempting to replay logs. This could be due to corrupted log files, missing logs, or hardware failures. |
OnixS::ICE::iMpact::MarketData::KnownErrors::LoginFailure | The ICE login attempt was unsuccessful. This could be due to incorrect login credentials, or issues with the authentication server. |
An important aspect of the Handler's behavior is that in usual case there's nothing special to be done to handle errors. In particular, once a subscription for market data successfully started, Handler will process incoming market data and handle all failures by itself without any necessity in additional actions. That means, there's no need to restart subscription for market data manually, Handler will do everything by himself. Also, the Handler performs recovering from errors in the optimal way. For example, in the case of network-related issues, the Handler will rebuild only those books and market states which are based on market data from problematic Multicast Price Feed channel. It will not invalidate and rebuild the entire subscription.
See Event Listeners topic for more information concerning how to subscribe to a particular event.
The Handler is able to recover the market state for all the product definitions from requested market subscriptions in case some packets lost. For this purpose it uses snapshot multicast channels. All the logic is implemented according to 5.2. Synchronization with Live Updates of the official ICE iMpact Multicast Feed Technical Specification.
In general, users don't need to do anything to handle missing packets as the Handler will start the recovery procedure and reconstruct the books. But if you want to tune this process you can use change the settings which are available in OnixS::ICE::iMpact::MarketData::SnapshotRecoveryOptions
.
TCP recovery is currently not implemented and there is no way to use it for the Handler even if you want to maintain it on your own.