Fix market data replay

This commit is contained in:
Eric Harding committed 2017-09-07 16:38:30 -04:00
1 parent 4c7cbf80b9
commit eb671ea2f9
5 files changed
+34 -1

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#include "run_md.h"
#include "lib/md/relay/RelayRecorder.h"
#include "lib/utils/bts_assert.h"
#include "lib/config/config.h"
#include "lib/config/protos/MarketData.pb.h"
#include <iostream>
#include <thread>
using namespace bts;
using namespace md;
void run_relay() {
auto naggle_ms = config::get<md::RelayOptions>().naggle_ms();
auto file = "http://mdreplay/c2/futures.coconut";
replay_recording(file, naggle_ms);
}
std::thread* _md_thread;
void run_market_datapublishers() {
bts_assert(_md_thread == nullptr);
// start a thread for the md
_md_thread = new std::thread([]() {
// just relay for now. More coming soon
run_relay();
});
}