public void DumpHistory() { for (var i = 0; i <= FixFactory.LastSequence; i++) { FIXTMessage1_1 message; if (FixFactory.TryGetHistory(i, out message)) { log.Info(message.ToString()); } } }
private bool HandleResend(MessageFIXT1_1 messageFIX) { int end = messageFIX.EndSeqNum == 0 ? FixFactory.LastSequence : messageFIX.EndSeqNum; if (debug) { log.Debug("Found resend request for " + messageFIX.BegSeqNum + " to " + end + ": " + messageFIX); } for (int i = messageFIX.BegSeqNum; i <= end; i++) { FIXTMessage1_1 textMessage; var gapFill = false; if (!FixFactory.TryGetHistory(i, out textMessage)) { gapFill = true; textMessage = GapFillMessage(i); } else { switch (textMessage.Type) { case "A": // Logon case "0": // Heartbeat case "1": // Heartbeat case "2": // Resend request. case "4": // Reset sequence. textMessage = GapFillMessage(i); gapFill = true; break; default: textMessage.SetDuplicate(true); break; } } if (gapFill) { if (debug) { var fixString = textMessage.ToString(); string view = fixString.Replace(FIXTBuffer.EndFieldStr, " "); log.Debug("Sending Gap Fill message " + i + ": \n" + view); } ResendMessageProtected(textMessage); } else { ResendMessage(textMessage); } } return(true); }