private void OnSnapshotReady(object sender, NetMQSocketEventArgs e) { string command = snapshotSocket.ReceiveString(); // Currently we only have one type of events if (command == SnapshotProtocol.GetTradessCommand) { var tickers = tickerRepository.GetAllTickers(); // we will send all the tickers in one message foreach (var ticker in tickers) { snapshotSocket.SendMore(JsonConvert.SerializeObject(ticker)); } snapshotSocket.Send(SnapshotProtocol.EndOfTickers); } }