Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Market Data Management : Using MDA with legacy market data components : The legacy application bridge
The legacy application bridge
The CMF also includes a Legacy Application Bridge that allows a legacy application that consumes the older style com.apama.marketdata event types, to connect to adapters that only offer the MDA market data event com.apama.md. The legacy bridge is an EPL layer which translates subscription, unsubscription and market data update events between the two architectures.
The Legacy Application bridge translates:
*com.apama.md.BBA, com.apama.md.D and com.apama.md.O MDA events into com.apama.marketdata.Depth events.
*com.apama.md.T MDA events into com.apama.marketdata.Tick events.
To use the Apama Legacy Application Bridge in a Software AG Designer project, add the Legacy Application Bridge bundle (from APAMA_FOUNDATION_HOME) as a dependency of the project.
If you use the CMF-macros.xml ANT script to start your project, the legacyapplication-bridge-bundle target can be used as a dependency to ensure the correct EPL files are injected into the correlator during start-up.
To enable the Apama Legacy Application Bridge to start translating events for the adapter session, send a configuration event:
com.apama.md.user.SessionConfiguration("@TRANSPORT_NAME@",{
"adapterName":"@TRANSPORT_NAME@",
"channelId":"@CHANNEL@",
"SERVICEID":"@SERVICEID@"})
Example:
com.apama.md.user.SessionConfiguration("ActivTransport",{
"adapterName":"ActivTransport",
"channelId":"Activ",
"SERVICEID":"Activ"})
Parameters:
*TRANSPORT_NAME - specifies the name of the IAF transport
*adapterName - specifies the name of the IAF transport
*channelId - specifies the ID of the IAF transport Channel
*SERVICEID - Specifies the ID of the service for market data. For use with the ATA.
Data Subscription Translation:
*com.apama.marketdata.SubscribeTick events are translated into com.apama.md.user.Connect events with the "streamType" set to "TRADE".
*com.apama.marketdata.SubscribeDepth events are translated into com.apama.md.user.Connect event. The "streamType" is extracted from the "subscriptionType" member of the extra params of the com.apama.marketdata.SubscribeDepth if present, else defaults to "MBP".
*com.apama.marketdata.UnsubscribeTick and com.apama.marketdata.UnsubscribeDepth are translated into com.apama.md.user.Disconnect events with the same rules as the subscriptions above.
*The complete list of the subscriptionType are as follows:-
*TRADE - trade subscription
*MBO - market by order, order subscription by order
*MBP - market by price, order subscription by price
*BBA - best bid ask, top of the book subscription
For subscription management, required extra parameters:
*Exchange - specifies the session name for the MDA adapter.
*subscriptionType - specifies the type of datastream such as, QUOTE or TRADE.
Example tick Subscriptions:
com.apama.marketdata.SubscribeTick("AdapterService",
"ActivTransport",
"MSFT.Q",
{"subscriptionType":"TRADE","Exchange":"Activ"})

com.apama.marketdata.UnsubscribeTick("AdapterService",
"ActivTransport",
"MSFT.Q",
{"subscriptionType":"TRADE","Exchange":"Activ"})
Market by price subscriptions:
com.apama.marketdata.SubscribeDepth("AdapterService",
"ActivTransport",
"MSFT.Q",
{"subscriptionType":"MBP","Exchange":"Activ"})

com.apama.marketdata.UnsubscribeDepth("AdapterService",
"ActivTransport",
"MSFT.Q",
{"subscriptionType":"MBP","Exchange":"Activ"})
Market by order subscriptions:
com.apama.marketdata.SubscribeDepth("AdapterService",
"ActivTransport","MSFT.Q",{"subscriptionType":"MBO","Exchange":"Activ"})

com.apama.marketdata.UnsubscribeDepth("AdapterService",
"ActivTransport",
"MSFT.Q",
{"subscriptionType":"MBO","Exchange":"Activ"})
Best bid ask subscriptions:
com.apama.marketdata.SubscribeDepth("AdapterService",
"ActivTransport",
"MSFT.Q",
{"subscriptionType":"BBA","Exchange":"Activ"})

com.apama.marketdata.UnsubscribeDepth("AdapterService",
"ActivTransport",
"MSFT.Q",
{"subscriptionType":"BBA","Exchange":"Activ"})
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback