Thread: [Quickfix-developers] How do I manually reset my sequence number?
Brought to you by:
orenmnero
|
From: mrvictory1999 <nab...@xo...> - 2007-11-05 21:51:17
|
I am connecting to a broker using QuickFix. In the case where our sequence numbers get out of sync, I am having trouble re-syncing. Specifically, if my QuickFix engine believes the sequence number should be 200, but the broker thinks it should be 300, I'll get a message like: MsgSeqNum too low, expecting 300 but received 200 Logon QuickFix will then repeatedly try to log in, incrementing the sequence number each time. So after 100 tries, it'll be at the right number. I need to know how to manually set my sequence number to 300 so that I can skip the 100 reconnect attempts. Thanks for your help! Matt -- View this message in context: http://www.nabble.com/How-do-I-manually-reset-my-sequence-number--tf4754663.html#a13596466 Sent from the QuickFIX - Dev mailing list archive at Nabble.com. |
|
From: Andrew C. <And...@Tw...> - 2007-11-05 21:59:27
|
Check out the <Session>.seqnum in the store dir/db (or something close = to that) The file/db table contains two seq number seperated by a colon - adjust = the first one to your broker's seq num -----Original Message----- From: qui...@li... [mailto:qui...@li...] On Behalf Of mrvictory1999 Sent: Monday, November 05, 2007 4:51 PM To: qui...@li... Subject: [Quickfix-developers] How do I manually reset my sequence = number? QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html I am connecting to a broker using QuickFix. In the case where our = sequence numbers get out of sync, I am having trouble re-syncing. Specifically, if my QuickFix engine believes the sequence number should = be 200, but the broker thinks it should be 300, I'll get a message like: MsgSeqNum too low, expecting 300 but received 200 Logon QuickFix will then repeatedly try to log in, incrementing the sequence number each time. So after 100 tries, it'll be at the right number. I need to know how to manually set my sequence number to 300 so that I = can skip the 100 reconnect attempts. Thanks for your help! Matt --=20 View this message in context: http://www.nabble.com/How-do-I-manually-reset-my-sequence-number--tf47546= 63. html#a13596466 Sent from the QuickFIX - Dev mailing list archive at Nabble.com. -------------------------------------------------------------------------= This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Quickfix-developers mailing list = Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
|
From: Rodrick B. <rod...@gm...> - 2007-11-07 02:40:26
|
Or have your broker EOD your session at the end of the trading day, and you should probably do the same on your end. On Nov 5, 2007 4:58 PM, Andrew Culross <And...@tw...> wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Check out the <Session>.seqnum in the store dir/db (or something close to > that) > > The file/db table contains two seq number seperated by a colon - adjust > the > first one to your broker's seq num > > -----Original Message----- > From: qui...@li... > [mailto:qui...@li...] On Behalf Of > mrvictory1999 > Sent: Monday, November 05, 2007 4:51 PM > To: qui...@li... > Subject: [Quickfix-developers] How do I manually reset my sequence number? > > > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > I am connecting to a broker using QuickFix. In the case where our > sequence > numbers get out of sync, I am having trouble re-syncing. > > Specifically, if my QuickFix engine believes the sequence number should be > 200, but the broker thinks it should be 300, I'll get a message like: > MsgSeqNum too low, expecting 300 but received 200 Logon > > QuickFix will then repeatedly try to log in, incrementing the sequence > number each time. So after 100 tries, it'll be at the right number. > > I need to know how to manually set my sequence number to 300 so that I can > skip the 100 reconnect attempts. > > Thanks for your help! > Matt > -- > View this message in context: > > http://www.nabble.com/How-do-I-manually-reset-my-sequence-number--tf4754663. > html#a13596466 > Sent from the QuickFIX - Dev mailing list archive at Nabble.com<http://nabble.com/> > . > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Quickfix-developers mailing list Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > -- Rodrick R. Brown http://www.rodrickbrown.com |
|
From: Patrick W. <pw...@ka...> - 2007-12-03 21:27:21
|
Here is some C# code for this:
public override void onMessage(QuickFix43.Logout message_,
SessionID session_)
{
Text text =3D new Text();
if (message_.isSetText())
{
message_.get(text);
string logoutMessage =3D text.ToString();
if(logoutMessage.IndexOf(Low sequence number ") > -1)
{
//message sequence number we are sending is too low
int index =3D logoutMessage.IndexOf("expecting");
if (index > -1)
{
int nextSpace =3D logoutMessage.LastIndexOf(' =
');
if (nextSpace > -1)
{
int expectedNum =3D
Convert.ToInt32(logoutMessage.Substring(nextSpace + 1));
=20
Session.lookupSession(session_).setNextSenderMsgSeqNum(expectedNum);
}
}
}
}
}
|
|
From: nri <Nic...@co...> - 2007-12-03 22:57:26
|
try something like this...
FIX::Session::lookupSession(sessionId)->setNextSenderMsgSeqNum(Send());
FIX::Session::lookupSession(sessionId)->setNextTargetMsgSeqNum(Recv());
where Send() and Recv() are the values you want to set too.
cheers
Nick
mrvictory1999 wrote:
>
> I am connecting to a broker using QuickFix. In the case where our
> sequence numbers get out of sync, I am having trouble re-syncing.
>
> Specifically, if my QuickFix engine believes the sequence number should be
> 200, but the broker thinks it should be 300, I'll get a message like:
> MsgSeqNum too low, expecting 300 but received 200 Logon
>
> QuickFix will then repeatedly try to log in, incrementing the sequence
> number each time. So after 100 tries, it'll be at the right number.
>
> I need to know how to manually set my sequence number to 300 so that I can
> skip the 100 reconnect attempts.
>
> Thanks for your help!
> Matt
>
--
View this message in context: http://www.nabble.com/How-do-I-manually-reset-my-sequence-number--tf4754663.html#a14140287
Sent from the QuickFIX - Dev mailing list archive at Nabble.com.
|