Re: [Quickfix-developers] reconnecting after diconnect
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-06-05 01:06:05
|
Well, in a typical recovery scenario this should never happen. If=20 someone is sending you sequence numbers that are too low, it is=20 considered a serious error that the FIX spec says requires manual=20 intervention. If an internet connection goes down, or a computer=20 crashes, this should not happen because QuickFIX (and any FIX engine)=20 can recover its state from the MessageStore and continue sending where=20= it left off. The only time this would not happen is if the state is=20 somehow destroyed or corrupted. Now if this does happen, you will have=20= to synchronize the sequence numbers. If you have control of both=20 sides, the easiest way to do this is to reset both sides to 1, which=20 can be done by just deleting the state. Otherwise you need to=20 coordinate with the counter-party and either one of you needs to adjust=20= your sequence numbers, or you can both reset to 1. If you did want to try to handle this programatically, you can set the=20= sequence numbers on the Session to whatever you want through the class=20= API, however this is a risky thing to do because you would risk one or=20= both of you losing messages without being aware of it. --oren On Jun 4, 2004, at 3:55 PM, Clark Sims wrote: > The next question is how do I fix this situation? > =A0 > In production I could easily see a situation where an internet=20 > connection goes down, or a computer crashes, or I have to kill the=20 > client, and when I bring it back up again, there is a problem with the=20= > sequence numbers. So I really need to be able to fix this problem. > > Clark Sims <cla...@ya...> wrote: > yes you are correct: > =A0 > 20040604-20:32:02 : Connection succeeded > 20040604-20:32:03 : Initiated logon request > 20040604-20:32:05 : MsgSeqNum too low RECEIVED: 11 EXPECTED: 165=20 > PosDup: N > 20040604-20:32:05 : Sequence number too low and PossDupFlag > > Do you Yahoo!? > Friends. Fun. Try the all-new Yahoo! Messenger > > Do you Yahoo!? > Friends. Fun. Try the all-new Yahoo! Messenger= |