public void Connect()
        {
            GetSnapshot();

            _orderBook.OnMessage += (s, m) => _marketDataSender.Send(m);
            _marketDataSender.Connect();

            _server.Start();
        }
 public void TakeSnapshot()
 {
     lock (_orderBook)
     {
         var snapshotSender = new KafkaSender(_brokerIds, "MarketData.New");
         snapshotSender.Connect();
         _orderBook.Dump().ForEach(o => snapshotSender.Send(new Message(o)));
         snapshotSender.Disconnect();
     }
 }