diff --git a/src/client/spark_api/md/MarketDataClient.cs b/src/client/spark_api/md/MarketDataClient.cs index 87749fcee..3e5e0b4fb 100644 --- a/src/client/spark_api/md/MarketDataClient.cs +++ b/src/client/spark_api/md/MarketDataClient.cs @@ -189,7 +189,7 @@ namespace bts.md var sec = lookup(key); if (sec.HasValue) { - security_desc = sec.Value.glbx_desc(); + security_desc = sec.Value.security_desc(); return true; } return false; @@ -198,7 +198,7 @@ namespace bts.md public bool lookup_security_key_from_desc(string security_desc, out SecurityKey key) { key = 0; - var fnd = find(x => x.glbx_desc() == security_desc).TryFirst(); + var fnd = find(x => x.security_desc() == security_desc).TryFirst(); if (fnd.HasValue) { key = fnd.Value.security.Id; diff --git a/src/client/spark_api/security/SecurityFormatter.cs b/src/client/spark_api/security/SecurityFormatter.cs index 0a328cdf2..f67123fca 100644 --- a/src/client/spark_api/security/SecurityFormatter.cs +++ b/src/client/spark_api/security/SecurityFormatter.cs @@ -39,7 +39,7 @@ namespace bts.api { static string _format(SecurityImmutable? security) { switch (security?.ContractCase) { - case ContractOneofCase.Future: return format_future(security?.Symbol, security?.glbx_desc(), security.Value.Future); + case ContractOneofCase.Future: return format_future(security?.Symbol, security?.security_desc(), security.Value.Future); case ContractOneofCase.Spread: if (security?.HasGlbx == true) { // In case we ever bring it back, pretty printed spread names can be found here: diff --git a/src/client/spark_api/security/SecurityHelper.cs b/src/client/spark_api/security/SecurityHelper.cs index 7ef75b988..905d34846 100644 --- a/src/client/spark_api/security/SecurityHelper.cs +++ b/src/client/spark_api/security/SecurityHelper.cs @@ -19,7 +19,7 @@ namespace bts.api { foreach (var l in legs) { switch (l.Security.ContractCase) { case ContractOneofCase.Future: - yield return new FutureLeg(l.Security.Exchange, l.Security.Symbol, l.Security.glbx_desc(), l.Security.Future, qty * l.SignedQuantity()); + yield return new FutureLeg(l.Security.Exchange, l.Security.Symbol, l.Security.security_desc(), l.Security.Future, qty * l.SignedQuantity()); break; case ContractOneofCase.Spread: foreach (var fl in _get_flat_future_legs(l.Security.Spread.Legs, qty * l.SignedQuantity())) @@ -57,8 +57,18 @@ namespace bts.api { public static string DisplayExchange(this SecurityImmutable security) => security.ContractCase == ContractOneofCase.Synthetic ? $"[{string.Join(",", get_flat_future_legs(security).Select(flt => flt.exchange.ToString()).Distinct().OrderBy(e => e))}]" : security.Exchange.ToString(); - public static string glbx_desc(this SecurityImmutable security) => - security.HasGlbx ? security.Glbx.SecurityDesc ?? string.Empty : string.Empty; + public static string security_desc(this SecurityImmutable security) + { + if(security.HasGlbx) + return security.Glbx.SecurityDesc; + else if(security.HasIce) + return security.Ice.SecurityDesc; + else + { + Log.assert(false, "security_desc not implemented for exchange"); + return null; + } + } #endregion public static class Comparer { diff --git a/src/lib/config/ConfigurationState.cpp b/src/lib/config/ConfigurationState.cpp index df1f97e64..dce50e8c6 100755 --- a/src/lib/config/ConfigurationState.cpp +++ b/src/lib/config/ConfigurationState.cpp @@ -40,7 +40,7 @@ #include "lib/config_proto_files.h" #include "lib/config_defaults.h" -using namespace std; +using namespace std; namespace bts { namespace config { diff --git a/src/lib/config/defaults/MarketData.conf b/src/lib/config/defaults/MarketData.conf index b42302541..80a42b405 100644 --- a/src/lib/config/defaults/MarketData.conf +++ b/src/lib/config/defaults/MarketData.conf @@ -38,19 +38,25 @@ CMEOptions { } } +ICEPublisherOptions { + value { + network_interface: "eth1" + } +} + ICEOptions { value { channel { name: "oil" market_type: 5 #ICE Futures Brent, IPE Brent Futures market_type: 9 #ICE Futures WTI, ICE WTI Crude Futures - #udp_buffer_size: 67108864 + #udp_buffer_size: 33554432 #32mb } channel { name: "juice" market_type: 23 #ICE Futures US Agricultures, FCOJ A } - ice_config_file: "ConnectivityConfiguration.APITest.xml" + ice_config_file: "ConnectivityConfiguration.APITest.xml" } } diff --git a/src/lib/config/defaults/Symbols.conf b/src/lib/config/defaults/Symbols.conf index fcbaa4439..c58ac27e2 100644 --- a/src/lib/config/defaults/Symbols.conf +++ b/src/lib/config/defaults/Symbols.conf @@ -8,6 +8,7 @@ SymbolLists symbol: "BRN" symbol: "WBS" + symbol: "OJ" } list { diff --git a/src/lib/config/protos/MarketData.proto b/src/lib/config/protos/MarketData.proto index 955e2934d..60cbd52b4 100755 --- a/src/lib/config/protos/MarketData.proto +++ b/src/lib/config/protos/MarketData.proto @@ -54,6 +54,14 @@ message PublisherOptions optional bool skip_options = 13 [default = true]; } +message ICEPublisherOptions +{ + optional string network_interface = 3 [default = "0.0.0.0"]; + // Supply either network_interface -or- network_interface_[a,b] + optional string network_interface_a = 30; + optional string network_interface_b = 31; +} + message PlatformConfig { required string platform = 1; @@ -145,7 +153,7 @@ message ICEOptions message ICEChannel { required string name = 1; repeated uint32 market_type = 2; - optional uint32 udp_buffer_size = 3 [default = 33554432]; //32mb + optional uint32 udp_buffer_size = 3 [default = 4194304]; //4mb optional uint32 heartbeat_interval = 4 [default = 36000]; optional uint32 sequence_gap_margin = 5 [default = 10000]; optional uint32 gap_timeout_in_ms = 6 [default = 10000]; diff --git a/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp b/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp index 8d462a2c8..90103e41d 100644 --- a/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp +++ b/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp @@ -25,14 +25,10 @@ double double_of_price(const onixs_ice::Rational& price, in ICEListener::ICEListener(ICESecurityIndex& index, MDProducer& producer, const std::vector channels) : _index(index), _producer(producer), - _packet_arrived(), - _latest_sequence(0), _symbol_filter(), _channels(channels), - _concurrency_monitor(0), - _book_updates() + _concurrency_monitor(0) { - _book_updates.reserve(32); } ICEListener::~ICEListener() {} @@ -60,17 +56,17 @@ void ICEListener::onMarketStateChange(const onixs_ice::MarketStateChange& , cons void ICEListener::onError(const onixs_ice::Error& error) { std::string error_desc(error.description()); - tracepoint (bts_trace,trace_order,(char*) "onError", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onError", 0, (uint16_t) 0, 0); LOG(md,Warn, "OnixS ICE Error: {} - {}", error.toString(), error_desc ); } void ICEListener::onFeedError(onixs_ice::FeedId feedid, onixs_ice::ErrorCode code, const std::string& desc) { - tracepoint (bts_trace,trace_order,(char*) "onFeedError", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onFeedError", 0, (uint16_t) 0, 0); LOG(md,Warn, "OnixS ICE FeedError: {} - {}", feedid, desc, code); } void ICEListener::onWarning(const onixs_ice::Warning& warning) { - tracepoint (bts_trace,trace_order,(char*) "onWarning", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onWarning", 0, (uint16_t) 0, 0); LOG(md,Warn, "OnixS ICE Warn: {} - {}", warning.toString(), std::string(warning.description()) ); } @@ -78,25 +74,23 @@ void ICEListener::onWarning(const onixs_ice::Warning& warning) // Security discovery void ICEListener::onFuturesProductDefinition(const onixs_ice::FuturesProductDefinition& msg, bool& is_interested) { - tracepoint (bts_trace,trace_order,(char*) "onFuturesProductDefinition", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onFuturesProductDefinition", 0, (uint16_t) 0, 0); on_future(msg, is_interested); } void ICEListener::onNewExpiry(const onixs_ice::NewExpiry& msg, bool& is_interested, const onixs_ice::MessageInfo& msg_info) -{ - UNUSED(msg_info); - tracepoint (bts_trace,trace_order,(char*) "onNewExpiry", _latest_sequence, (uint16_t) _latest_sequence, 0); +{ + tracepoint (bts_trace,trace_order,(char*) "onNewExpiry", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); on_future(msg, is_interested); } void ICEListener::onFuturesStrategyDefinition(const onixs_ice::FuturesStrategyDefinition& def, bool& is_interested) { - tracepoint (bts_trace,trace_order,(char*) "onFuturesStrategyDefinition", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onFuturesStrategyDefinition", 0, (uint16_t) 0, 0); on_future_spread(def, is_interested); } void ICEListener::onNewFuturesStrategyDefinition(const onixs_ice::NewFuturesStrategyDefinition& msg, bool& is_interested, const onixs_ice::MessageInfo& msg_info) { - UNUSED(msg_info); - tracepoint (bts_trace,trace_order,(char*) "onFuturesStrategyDefinition", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onFuturesStrategyDefinition", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); on_future_spread(msg, is_interested); } @@ -145,11 +139,45 @@ void ICEListener::onMarketSnapshotPriceLevel(const onixs_ice::MarketSnapshotPric // // Book -void ICEListener::onOrderBookUpdated(const onixs_ice::OrderBook& book, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onOrderBookUpdated(const onixs_ice::OrderBook& onixs_book, const onixs_ice::MessageInfo& msg_info) { - UNUSED(msg_info); - on_book(book, book_type_direct); - on_book(book, book_type_implied); + tracepoint (bts_trace,trace_order,(char*) "onBookUpdate", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); + + auto data = _index.get_security(onixs_book.marketId()); + if (data == nullptr) + return; + bts_assert(data->id == (uint32_t)onixs_book.marketId()); + auto display_factor = data->handle.security().display_factor; + + // Overwrite all entries every time + size_t bids_size = onixs_book.bids().size(); + size_t asks_size = onixs_book.offers().size(); + if (!data->handle.has_depth()) + { + bids_size = std::min(bids_size, size_t { 1 }); + asks_size = std::min(asks_size, size_t { 1 }); + } + std::array dbids; dbids.fill(NO_MARKET); + std::array ibids; ibids.fill(NO_MARKET); + std::array dasks; dasks.fill(NO_MARKET); + std::array iasks; iasks.fill(NO_MARKET); + for (size_t x = 0; x < bids_size; ++x) + { + auto& bid = onixs_book.bids()[x]; + if(x < COCONUT_MAX_DEPTH) + dbids[x] = pricesize_of_price_size(bid.price, display_factor, bid.quantity - bid.impliedQuantity); + if(x < COCONUT_MAX_IMPLIED_DEPTH) + ibids[x] = pricesize_of_price_size(bid.price, display_factor, bid.impliedQuantity); + } + for (size_t x = 0; x < asks_size; ++x) + { + auto& ask = onixs_book.offers()[x]; + if(x < COCONUT_MAX_DEPTH) + dasks[x] = pricesize_of_price_size(ask.price, display_factor, ask.quantity - ask.impliedQuantity); + if(x < COCONUT_MAX_IMPLIED_DEPTH) + iasks[x] = pricesize_of_price_size(ask.price, display_factor, ask.impliedQuantity); + } + data->handle.update_books(TimeStamp::now(), dbids, dasks, ibids, iasks, (uint32_t) msg_info.sequenceNumber); } // @@ -177,8 +205,7 @@ void on_trade(ICESecurityData* data, const onixs_ice::Price& price, int size, on void ICEListener::onTrade(const onixs_ice::Trade& msg, const onixs_ice::MessageInfo& msg_info) { - UNUSED(msg_info); - tracepoint (bts_trace,trace_order,(char*) "onTrade", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onTrade", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != NULL) { @@ -194,8 +221,7 @@ void ICEListener::onTrade(const onixs_ice::Trade& msg, const onixs_ice::MessageI // RFQ void ICEListener::onRfq(const onixs_ice::Rfq& msg, const onixs_ice::MessageInfo& msg_info) { - UNUSED(msg_info); - tracepoint (bts_trace,trace_order,(char*) "onRfq", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onRfq", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -231,9 +257,8 @@ void ICEListener::onRfq(const onixs_ice::Rfq& msg, const onixs_ice::MessageInfo& // // Misc void ICEListener::onSettlementPrice(const onixs_ice::SettlementPrice& msg, const onixs_ice::MessageInfo& msg_info) -{ - UNUSED(msg_info); - tracepoint (bts_trace,trace_order,(char*) "onSettlementPrice", _latest_sequence, (uint16_t) _latest_sequence, 0); +{ + tracepoint (bts_trace,trace_order,(char*) "onSettlementPrice", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -253,8 +278,7 @@ void ICEListener::onOpenInterest(const onixs_ice::OpenInterest &msg, const onixs void ICEListener::onOpenPrice(const onixs_ice::OpenPrice& msg, const onixs_ice::MessageInfo& msg_info) { - UNUSED(msg_info); - tracepoint (bts_trace,trace_order,(char*) "onOpenPrice", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onOpenPrice", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -268,8 +292,7 @@ void ICEListener::onOpenPrice(const onixs_ice::OpenPrice& msg, const onixs_ice:: void ICEListener::onClosePrice(const onixs_ice::ClosePrice& msg, const onixs_ice::MessageInfo& msg_info) { - UNUSED(msg_info); - tracepoint (bts_trace,trace_order,(char*) "onClosePrice", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onClosePrice", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -283,8 +306,7 @@ void ICEListener::onClosePrice(const onixs_ice::ClosePrice& msg, const onixs_ice void ICEListener::onEndOfDayMarketSummary(const onixs_ice::EndOfDayMarketSummary& msg, const onixs_ice::MessageInfo& msg_info) { - UNUSED(msg_info); - tracepoint (bts_trace,trace_order,(char*) "onEndOfDayMarketSummary", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onEndOfDayMarketSummary", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -303,30 +325,15 @@ void ICEListener::onEndOfDayMarketSummary(const onixs_ice::EndOfDayMarketSummary void ICEListener::onMulticastMessageBlockBegin(onixs_ice::FeedId feedId, const onixs_ice::MessageInfo& msg_info) { UNUSED(feedId); - // Mark the arrival of the packet - _packet_arrived = TimeStamp::now(); - uint32_t seq = (uint32_t)msg_info.sequenceNumber; - if (!_book_updates.empty()) - { - if (_latest_sequence != seq) - LOG(md, Error, "Expected sequence {} got {} did not flush {} book updates.", _latest_sequence, seq, _book_updates.size()); - } - _latest_sequence = seq; - auto onixs_zero = msg_info.receiveTime; - auto onixs_now = onixs_ice::Timestamp::utcNow(); - - UNUSED(onixs_zero); - UNUSED(onixs_now); - tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockBegin", _latest_sequence,(uint16_t) _latest_sequence, /*onixs_now-onixs_zero*/0); + tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockBegin", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); } void ICEListener::onMulticastMessageBlockEnd(onixs_ice::FeedId feedId, const onixs_ice::MarketIds& marketIds) { UNUSED(feedId); UNUSED(marketIds); - tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockEnd.begin", _latest_sequence, (uint16_t) _latest_sequence, 0); - flush_books(); - tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockEnd.end", _latest_sequence, (uint16_t) _latest_sequence, 0); + tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockEnd.begin", 0, (uint16_t) 0, 0); + tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockEnd.end", 0, (uint16_t) 0, 0); } void ICEListener::onFeedStarted(onixs_ice::FeedId, const onixs_ice::MarketIds&) @@ -362,31 +369,6 @@ void ICEListener::add_security(const FixedSecurity& security) _index.add_security(security.numeric_id, handle); } -void ICEListener::flush_books() -{ - // This is called at the end of the packet - // Write all book updates to shared memory and reset for the next packet - for (auto& entry : _book_updates) - { - uint32_t sequence = _latest_sequence; - if (entry.type_flags == book_type_direct) - { - entry.handle.update_direct(_packet_arrived, entry.bids.first, entry.asks.first, sequence); - } - else if (entry.type_flags == book_type_implied) - { - entry.handle.update_implied(_packet_arrived, entry.bids.second, entry.asks.second, sequence); - } - else if (entry.type_flags == book_type_both) - { - entry.handle.update_books(_packet_arrived, entry.bids.first, entry.asks.first, - entry.bids.second, entry.asks.second, sequence); - } - } - // Reset pending updates - _book_updates.clear(); -} - void ICEListener::update_all_status(CoconutSecurityStatus status) { _index.walk_security_list([=](ICESecurityData& data) @@ -395,8 +377,6 @@ void ICEListener::update_all_status(CoconutSecurityStatus status) }); } -md::ice::ICEListener::BookData::BookData(MDProducerHandle & handle) : handle(handle), type_flags(0), bids(), asks() { } - }}} //namespace diff --git a/src/server/sparkd/md/platforms/ice_onixs/ICEListener.h b/src/server/sparkd/md/platforms/ice_onixs/ICEListener.h index c7cac707a..b3146c3e5 100644 --- a/src/server/sparkd/md/platforms/ice_onixs/ICEListener.h +++ b/src/server/sparkd/md/platforms/ice_onixs/ICEListener.h @@ -127,20 +127,9 @@ private: ICESecurityIndex& _index; MDProducer& _producer; - utils::TimeStamp _packet_arrived; - uint32_t _latest_sequence; std::set _symbol_filter; std::vector _channels; std::atomic _concurrency_monitor; - - struct BookData { - BookData(MDProducerHandle& handle); - MDProducerHandle handle; - BookType type_flags; - std::pair, std::array> bids; - std::pair, std::array> asks; - }; - std::vector _book_updates; }; template @@ -212,72 +201,5 @@ void ICEListener::on_future_spread(const Definition& def, bool& is_interested) is_interested = true; } -template -void ICEListener::on_book(const TBook& onixs_book, BookType booktype) -{ - tracepoint (bts_trace,trace_order,(char*) "onBookUpdate", _latest_sequence, (uint16_t) _latest_sequence, 0); - - auto data = _index.get_security(onixs_book.marketId()); - if (data == nullptr) - return; - bts_assert(data->id == (uint32_t)onixs_book.marketId()); - auto display_factor = data->handle.security().display_factor; - - // Put the data into the cache. Flush at the end of the packet. - auto key = data->handle.key(); - auto find_iter = std::find_if(_book_updates.begin(), _book_updates.end(), [key](const BookData& entry) - { - return key == entry.handle.key(); - }); - bool found = find_iter != _book_updates.end(); - if (!found) - _book_updates.emplace_back(data->handle); - - BookData& cache = found ? *find_iter : _book_updates.back(); - cache.type_flags |= booktype; - auto& cache_bids = std::get>(cache.bids); - auto& cache_asks = std::get>(cache.asks); - - // Overwrite all entries every time - size_t bids_size = onixs_book.bids().size(); - size_t asks_size = onixs_book.offers().size(); - if (!data->handle.has_depth()) - { - bids_size = std::min(bids_size, size_t { 1 }); - asks_size = std::min(asks_size, size_t { 1 }); - } - if(booktype == book_type_direct) - { - for (size_t x = 0; x < bids_size; ++x) - { - auto& bid = onixs_book.bids()[x]; - cache_bids[x] = pricesize_of_price_size(bid.price, display_factor, bid.quantity - bid.impliedQuantity); - } - for (size_t x = 0; x < asks_size; ++x) - { - auto& ask = onixs_book.offers()[x]; - cache_asks[x] = pricesize_of_price_size(ask.price, display_factor, ask.quantity - ask.impliedQuantity); - } - } - else if(booktype == book_type_implied) - { - for (size_t x = 0; x < bids_size; ++x) - cache_bids[x] = pricesize_of_price_size(onixs_book.bids()[x].price, display_factor, onixs_book.bids()[x].impliedQuantity); - for (size_t x = 0; x < asks_size; ++x) - cache_asks[x] = pricesize_of_price_size(onixs_book.offers()[x].price, display_factor, onixs_book.offers()[x].impliedQuantity); - } - else - bts_assert_msg(false, "invalid book type"); - - if (!found) - { - // NaN out the remaining depth - for (size_t x = bids_size; x < MAX_DEPTH; ++x) - cache_bids[x] = NO_MARKET; - for (size_t x = asks_size; x < MAX_DEPTH; ++x) - cache_asks[x] = NO_MARKET; - } -} - }}} //namespace diff --git a/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp b/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp index ce2384b05..4942e9585 100644 --- a/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp +++ b/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp @@ -114,10 +114,10 @@ void ICEMain::run(std::vector& symbols) } for (auto& pair : _handlers) - { - LOG(md,Info, "ICE: Init Handler {}", pair.first.to_string()); + { onixs_ice::MarketSubscriptions subs = market_subcription_for_channel(pair.first); pair.second->start(subs); + LOG(md,Info, "ICE: Init Handler {}", pair.first.to_string()); sleep_for(16s); } @@ -142,8 +142,7 @@ unique_ptr ICEMain::prepare_handler(const ICEChannel& channe auto license = ice_options.onixs_license(); if (license == "{default}") license = os::bts_data_path() + "/licenses/"; - - const auto& pub_options = config::get(); + const auto& options = channel_settings_for(channel); LOG(md,Info,"Loaded channel options for channel {}:\n{}", channel.to_string(), options.DebugString()); @@ -158,8 +157,9 @@ unique_ptr ICEMain::prepare_handler(const ICEChannel& channe // Config file settings.connectivityConfiguration = ice_config_path(); - // + // // Network settings + const auto& pub_options = config::get(); if (pub_options.has_network_interface()) settings.networkInterface = pub_options.network_interface(); else diff --git a/src/server/sparkd/md/run_md.cpp b/src/server/sparkd/md/run_md.cpp index 8fa973de2..16d13a876 100644 --- a/src/server/sparkd/md/run_md.cpp +++ b/src/server/sparkd/md/run_md.cpp @@ -68,10 +68,13 @@ void run_replay() { void run_onixs() { // get all glbx symbols - std::vector symbols; - get_system_md_symbols(api::VENUE_GLBX, api::SECURITYTYPE_UNSET, &symbols); - MDP3Main main; - //main.run(symbols); TODO + std::vector cme_symbols; + get_system_md_symbols(api::VENUE_GLBX, api::SECURITYTYPE_UNSET, &cme_symbols); + if(cme_symbols.size() > 0) + { + MDP3Main main; + //main.run(symbols); TODO + } std::vector ice_symbols; get_system_md_symbols(api::VENUE_ICE, api::SECURITYTYPE_UNSET, &ice_symbols);