Logon contains ResetSeqNumFlag=Y, reseting sequence numbers to 1

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Logon contains ResetSeqNumFlag=Y, reseting sequence numbers to 1

Alexey Zubko
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ
QuickFIX Support: http://www.quickfixengine.org/services.html

Hi,

I've got a new sequencing problem and I want to know who is right in
this situation.

In the CVS version QF reset sequence number if ResetSeqNumFlag is
present in logon message.

So I fail in the following scenario:
My QF initiator connects to a third-part server (Currenex) with the flag
and receives logon
message with sequence number 1 and with this flag too. QF (Session
class) resets sequence number,
and the next message I send has sequence number 1. So, the server sends
me logout -
"MsgSeqNum too low, expecting 2 but received 1".

Who is right? Should QF reset sequence number on logon confirmation or
the server shouldn't
send the flag, or QF reset is correct?

Thank you in advance.

--

Regards,
                Alexey Zubko

Infinium Capital Corporation
(416) 360-7000 ext. 305



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: Logon contains ResetSeqNumFlag=Y, reseting sequence numbers to 1

Oren Miller
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ
QuickFIX Support: http://www.quickfixengine.org/services.html

Well, here is what the spec says on the subject:

"When using the ResetSeqNumFlag to maintain 24 hour connectivity and  
establish a new set of sequence numbers, the process should be as  
follows.  Both sides should agree on a reset time and the party that  
will be the initiator of the process.  Note that the initiator of the  
ResetSeqNum process may be different than the initiator of the Logon  
process. One side will initiate the process by sending a TestRequest  
and wait for a Heartbeat in response to ensure of no sequence number  
gaps.  Once the Heartbeat has been received, the initiator should  
send a Logon with ResetSeqNumFlag set to Y and with MsgSeqNum of 1.  
The acceptor should respond with a Logon with ResetSeqNumFlag set to  
Y and with MsgSeqNum of 1.  At this point new messages from either  
side should continue with MsgSeqNum of 2.  It should be noted that  
once the initiator sends the Logon with the ResetSeqNumFlag set, the  
acceptor must obey this request and the message with the last  
sequence number transmitted “yesterday” may no longer be available.  
The connection should be shutdown and manual intervention taken if  
this process is initiated but not followed properly."

So it would seem to me that when they send a Logon with the  
ResetSeqNumFlag set, the first thing QF should do is send a Logon  
message with a MsgSeqNum of 1, followed by your message with a  
sequence number of 2.  Is this message going out?  If not then that  
could be a problem.  I don't think we have a test case for an  
initiator processing a ResetSeqNumFlag, so I can imagine this  
scenario might not be handled correctly.

--oren

On Jun 30, 2005, at 9:04 AM, Alexey Zubko wrote:

> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ 
> html/index.html
> QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?
> QuickFixFAQ
> QuickFIX Support: http://www.quickfixengine.org/services.html
>
> Hi,
>
> I've got a new sequencing problem and I want to know who is right  
> in this situation.
>
> In the CVS version QF reset sequence number if ResetSeqNumFlag is  
> present in logon message.
>
> So I fail in the following scenario:
> My QF initiator connects to a third-part server (Currenex) with the  
> flag and receives logon
> message with sequence number 1 and with this flag too. QF (Session  
> class) resets sequence number,
> and the next message I send has sequence number 1. So, the server  
> sends me logout -
> "MsgSeqNum too low, expecting 2 but received 1".
>
> Who is right? Should QF reset sequence number on logon confirmation  
> or the server shouldn't
> send the flag, or QF reset is correct?
>
> Thank you in advance.
>
> --
>
> Regards,
>         Alexey Zubko
>
> Infinium Capital Corporation
> (416) 360-7000 ext. 305
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Quickfix-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
>



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: Logon contains ResetSeqNumFlag=Y, reseting sequence numbers to 1

Alexey Zubko
Oren,

It looks like due to the specification the server acts correctly.
So, QF initiator should not reset sequence numbers on logon confirmation I think.

Here are the logs:

QF initiator:
8=FIX.4.2.9=88.35=A.34=1.49=F.52=20050630-13:05:01.022.56=CURRENEX-FXTRADES-FIX.98=0.108=30.141=Y.10=154.
8=FIX.4.2.9=139.35=V.34=1.49=F.52=20050630-13:05:01.304.56=CURRENEX-FXTRADES-FIX.146=1.55=AUD/USD.262=ICMD0.263=1.264=1.265=1.266=Y.267=2.269=0.269=1.10=233.
8=FIX.4.2.9=139.35=V.34=2.49=F.52=20050630-13:05:01.304.56=CURRENEX-FXTRADES-FIX.146=1.55=EUR/USD.262=ICMD1.263=1.264=1.265=1.266=Y.267=2.269=0.269=1.10=253.


The server:
8=FIX.4.2.9=84.35=A.49=CURRENEX-FXTRADES-FIX.56=F.34=1.52=20050630-13:05:01.108=30.141=Y.98=0.10=212.
8=FIX.4.2.9=78.35=h.49=CURRENEX-FXTRADES-FIX.56=F.34=2.52=20050630-13:05:01.336=0.340=2.10=202.
8=FIX.4.2.9=133.35=5.49=CURRENEX-FXTRADES-FIX.56=F.34=3.52=20050630-13:05:01.58=MsgSeqNum too low, expecting 2 but received 1 MarketDataRequest.10=045.



Regards,
		Alexey Zubko

Infinium Capital Corporation
(416) 360-7000 ext. 305


Oren Miller wrote:
Well, here is what the spec says on the subject:

"When using the ResetSeqNumFlag to maintain 24 hour connectivity and  establish a new set of sequence numbers, the process should be as  follows.  Both sides should agree on a reset time and the party that  will be the initiator of the process.  Note that the initiator of the  ResetSeqNum process may be different than the initiator of the Logon  process. One side will initiate the process by sending a TestRequest  and wait for a Heartbeat in response to ensure of no sequence number  gaps.  Once the Heartbeat has been received, the initiator should  send a Logon with ResetSeqNumFlag set to Y and with MsgSeqNum of 1.   The acceptor should respond with a Logon with ResetSeqNumFlag set to  Y and with MsgSeqNum of 1.  At this point new messages from either  side should continue with MsgSeqNum of 2.  It should be noted that  once the initiator sends the Logon with the ResetSeqNumFlag set, the  acceptor must obey this request and the message with the last  sequence number transmitted “yesterday” may no longer be available.   The connection should be shutdown and manual intervention taken if  this process is initiated but not followed properly."

So it would seem to me that when they send a Logon with the  ResetSeqNumFlag set, the first thing QF should do is send a Logon  message with a MsgSeqNum of 1, followed by your message with a  sequence number of 2.  Is this message going out?  If not then that  could be a problem.  I don't think we have a test case for an  initiator processing a ResetSeqNumFlag, so I can imagine this  scenario might not be handled correctly.

--oren

On Jun 30, 2005, at 9:04 AM, Alexey Zubko wrote:

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ html/index.html
QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php? QuickFixFAQ
QuickFIX Support: http://www.quickfixengine.org/services.html

Hi,

I've got a new sequencing problem and I want to know who is right  in this situation.

In the CVS version QF reset sequence number if ResetSeqNumFlag is  present in logon message.

So I fail in the following scenario:
My QF initiator connects to a third-part server (Currenex) with the  flag and receives logon
message with sequence number 1 and with this flag too. QF (Session  class) resets sequence number,
and the next message I send has sequence number 1. So, the server  sends me logout -
"MsgSeqNum too low, expecting 2 but received 1".

Who is right? Should QF reset sequence number on logon confirmation  or the server shouldn't
send the flag, or QF reset is correct?

Thank you in advance.

-- 

Regards,
        Alexey Zubko

Infinium Capital Corporation
(416) 360-7000 ext. 305



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers






	
	
	
	
Reply | Threaded
Open this post in threaded view
|

Re: Logon contains ResetSeqNumFlag=Y, reseting sequence numbers to 1

Francis *
In reply to this post by Alexey Zubko
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ
QuickFIX Support: http://www.quickfixengine.org/services.html

I am having the same problem with another server.  QuickFix assigns a
sequence number of 1 to the second message after a ResetSeqNumFlag reset.

Initiator outgoing log:
8=FIX.4.29=8735=A34=149=FIXUSER252=20050630-15:46:05.62556=PRICES96=F
IXPASS298=0108=15141=Y10=080
-->Result: the acceptor logs "Expecting sequence number 2 after receiving
reset from client" but it does not drop the connection.

8=FIX.4.29=6935=c34=149=FIXUSER252=20050630-15:46:06.92156=PRICES320=
0321=310=054
-->Result: disconnected.   Th acceptor logs "Receive message with sequence
number too low without PossDupFlag = Yes.  Disconnecting"

Francis Gingras



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: Logon contains ResetSeqNumFlag=Y, reseting sequence numbers to 1

Oren Miller
In reply to this post by Alexey Zubko
I attached a patch to address this problem.  Please try this out and report the results back to me as soon as you can.  Thanks.
 
--oren
----- Original Message -----
Sent: Thursday, June 30, 2005 12:07 PM
Subject: Re: [Quickfix-developers] Logon contains ResetSeqNumFlag=Y, reseting sequence numbers to 1

Oren,

It looks like due to the specification the server acts correctly.
So, QF initiator should not reset sequence numbers on logon confirmation I think.

Here are the logs:

QF initiator:
8=FIX.4.2.9=88.35=A.34=1.49=F.52=20050630-13:05:01.022.56=CURRENEX-FXTRADES-FIX.98=0.108=30.141=Y.10=154.
8=FIX.4.2.9=139.35=V.34=1.49=F.52=20050630-13:05:01.304.56=CURRENEX-FXTRADES-FIX.146=1.55=AUD/USD.262=ICMD0.263=1.264=1.265=1.266=Y.267=2.269=0.269=1.10=233.
8=FIX.4.2.9=139.35=V.34=2.49=F.52=20050630-13:05:01.304.56=CURRENEX-FXTRADES-FIX.146=1.55=EUR/USD.262=ICMD1.263=1.264=1.265=1.266=Y.267=2.269=0.269=1.10=253.


The server:
8=FIX.4.2.9=84.35=A.49=CURRENEX-FXTRADES-FIX.56=F.34=1.52=20050630-13:05:01.108=30.141=Y.98=0.10=212.
8=FIX.4.2.9=78.35=h.49=CURRENEX-FXTRADES-FIX.56=F.34=2.52=20050630-13:05:01.336=0.340=2.10=202.
8=FIX.4.2.9=133.35=5.49=CURRENEX-FXTRADES-FIX.56=F.34=3.52=20050630-13:05:01.58=MsgSeqNum too low, expecting 2 but received 1 MarketDataRequest.10=045.



Regards,
		Alexey Zubko

Infinium Capital Corporation
(416) 360-7000 ext. 305


Oren Miller wrote:
Well, here is what the spec says on the subject:

"When using the ResetSeqNumFlag to maintain 24 hour connectivity and  establish a new set of sequence numbers, the process should be as  follows.  Both sides should agree on a reset time and the party that  will be the initiator of the process.  Note that the initiator of the  ResetSeqNum process may be different than the initiator of the Logon  process. One side will initiate the process by sending a TestRequest  and wait for a Heartbeat in response to ensure of no sequence number  gaps.  Once the Heartbeat has been received, the initiator should  send a Logon with ResetSeqNumFlag set to Y and with MsgSeqNum of 1.   The acceptor should respond with a Logon with ResetSeqNumFlag set to  Y and with MsgSeqNum of 1.  At this point new messages from either  side should continue with MsgSeqNum of 2.  It should be noted that  once the initiator sends the Logon with the ResetSeqNumFlag set, the  acceptor must obey this request and the message with the last  sequence number transmitted “yesterday” may no longer be available.   The connection should be shutdown and manual intervention taken if  this process is initiated but not followed properly."

So it would seem to me that when they send a Logon with the  ResetSeqNumFlag set, the first thing QF should do is send a Logon  message with a MsgSeqNum of 1, followed by your message with a  sequence number of 2.  Is this message going out?  If not then that  could be a problem.  I don't think we have a test case for an  initiator processing a ResetSeqNumFlag, so I can imagine this  scenario might not be handled correctly.

--oren

On Jun 30, 2005, at 9:04 AM, Alexey Zubko wrote:

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ html/indexhtml.
QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php? QuickFixFAQ
QuickFIX Support: http://www.quickfixengine.org/services.html

Hi,

I've got a new sequencing problem and I want to know who is right  in this situation.

In the CVS version QF reset sequence number if ResetSeqNumFlag is  present in logon message.

So I fail in the following scenario:
My QF initiator connects to a third-part server (Currenex) with the  flag and receives logon
message with sequence number 1 and with this flag too. QF (Session  class) resets sequence number,
and the next message I send has sequence number 1. So, the server  sends me logout -
"MsgSeqNum too low, expecting 2 but received 1".

Who is right? Should QF reset sequence number on logon confirmation  or the server shouldn't
send the flag, or QF reset is correct?

Thank you in advance.

-- 

Regards,
        Alexey Zubko

Infinium Capital Corporation
(416) 360-7000 ext. 305



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers





SequenceReset.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Logon contains ResetSeqNumFlag=Y, reseting sequence numbers to 1

Oren Miller
In reply to this post by Alexey Zubko
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ
QuickFIX Support: http://www.quickfixengine.org/services.html

Hold off on that patch.  I found a bug in it.  I'm preparing another.

--oren

On Jun 30, 2005, at 12:07 PM, Alexey Zubko wrote:

> Oren,
>
> It looks like due to the specification the server acts correctly.
> So, QF initiator should not reset sequence numbers on logon  
> confirmation I think.
>
> Here are the logs:
>
> QF initiator:
> 8=FIX.4.2.9=88.35=A.34=1.49=F.52=20050630-13:05:01.022.56=CURRENEX-
> FXTRADES-FIX.98=0.108=30.141=Y.10=154.
> 8=FIX.4.2.9=139.35=V.34=1.49=F.52=20050630-13:05:01.304.56=CURRENEX-
> FXTRADES-FIX.146=1.55=AUD/USD.262=ICMD0.263=1.264=1.265=1.266=Y.
> 267=2.269=0.269=1.10=233.
> 8=FIX.4.2.9=139.35=V.34=2.49=F.52=20050630-13:05:01.304.56=CURRENEX-
> FXTRADES-FIX.146=1.55=EUR/USD.262=ICMD1.263=1.264=1.265=1.266=Y.
> 267=2.269=0.269=1.10=253.
>
>
> The server:
> 8=FIX.4.2.9=84.35=A.49=CURRENEX-FXTRADES-FIX.56=F.
> 34=1.52=20050630-13:05:01.108=30.141=Y.98=0.10=212.
> 8=FIX.4.2.9=78.35=h.49=CURRENEX-FXTRADES-FIX.56=F.
> 34=2.52=20050630-13:05:01.336=0.340=2.10=202.
> 8=FIX.4.2.9=133.35=5.49=CURRENEX-FXTRADES-FIX.56=F.
> 34=3.52=20050630-13:05:01.58=MsgSeqNum too low, expecting 2 but  
> received 1 MarketDataRequest.10=045.
>
>
>
> Regards, Alexey Zubko Infinium Capital Corporation (416) 360-7000  
> ext. 305
>
> Oren Miller wrote:
>> Well, here is what the spec says on the subject:
>>
>> "When using the ResetSeqNumFlag to maintain 24 hour connectivity  
>> and  establish a new set of sequence numbers, the process should  
>> be as  follows.  Both sides should agree on a reset time and the  
>> party that  will be the initiator of the process.  Note that the  
>> initiator of the  ResetSeqNum process may be different than the  
>> initiator of the Logon  process. One side will initiate the  
>> process by sending a TestRequest  and wait for a Heartbeat in  
>> response to ensure of no sequence number  gaps.  Once the  
>> Heartbeat has been received, the initiator should  send a Logon  
>> with ResetSeqNumFlag set to Y and with MsgSeqNum of 1.   The  
>> acceptor should respond with a Logon with ResetSeqNumFlag set to  
>> Y and with MsgSeqNum of 1.  At this point new messages from  
>> either  side should continue with MsgSeqNum of 2.  It should be  
>> noted that  once the initiator sends the Logon with the  
>> ResetSeqNumFlag set, the  acceptor must obey this request and the  
>> message with the last  sequence number transmitted “yesterday” may  
>> no longer be available.   The connection should be shutdown and  
>> manual intervention taken if  this process is initiated but not  
>> followed properly."
>>
>> So it would seem to me that when they send a Logon with the  
>> ResetSeqNumFlag set, the first thing QF should do is send a Logon  
>> message with a MsgSeqNum of 1, followed by your message with a  
>> sequence number of 2.  Is this message going out?  If not then  
>> that  could be a problem.  I don't think we have a test case for  
>> an  initiator processing a ResetSeqNumFlag, so I can imagine this  
>> scenario might not be handled correctly.
>>
>> --oren
>>
>> On Jun 30, 2005, at 9:04 AM, Alexey Zubko wrote:
>>
>>> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/ 
>>> doc/ html/indexhtml.
>>> QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?  
>>> QuickFixFAQ
>>> QuickFIX Support: http://www.quickfixengine.org/services.html
>>>
>>> Hi,
>>>
>>> I've got a new sequencing problem and I want to know who is  
>>> right  in this situation.
>>>
>>> In the CVS version QF reset sequence number if ResetSeqNumFlag  
>>> is  present in logon message.
>>>
>>> So I fail in the following scenario:
>>> My QF initiator connects to a third-part server (Currenex) with  
>>> the  flag and receives logon
>>> message with sequence number 1 and with this flag too. QF  
>>> (Session  class) resets sequence number,
>>> and the next message I send has sequence number 1. So, the  
>>> server  sends me logout -
>>> "MsgSeqNum too low, expecting 2 but received 1".
>>>
>>> Who is right? Should QF reset sequence number on logon  
>>> confirmation  or the server shouldn't
>>> send the flag, or QF reset is correct?
>>>
>>> Thank you in advance.
>>>
>>> --
>>>
>>> Regards,
>>>         Alexey Zubko
>>>
>>> Infinium Capital Corporation
>>> (416) 360-7000 ext. 305
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> SF.Net email is sponsored by: Discover Easy Linux Migration  
>>> Strategies
>>> from IBM. Find simple to follow Roadmaps, straightforward articles,
>>> informative Webcasts and more! Get everything you need to get up to
>>> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>>> _______________________________________________
>>> Quickfix-developers mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>>>
>>>
>>
>>



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: Logon contains ResetSeqNumFlag=Y, reseting sequence numbers to 1

smith2112
This post has NOT been accepted by the mailing list yet.
Hi,

Apologies for picking up this old issue. But I am encountering the same issue in quickfix 1.5.3 java library currently. Please let me know if this issue was treated as a bug and fixed in subsequent versions. Otherwise, please clarify how it can be resolved

Thanks