RE: [Quickfix-developers] Generating two Test requests in a row
Brought to you by:
orenmnero
From: Shane R. <Sr...@ty...> - 2005-03-03 15:14:02
|
Thanks for the reply. No neither of those cases. After I logon, if I don't receive a response to a heart beat I am = supposed to wait a reasonable amount of time and then send a TestRequest = message (as per the fix 4.2 specs). But what isn't inline with the specs = is that I am supposed to wait some more time and second a second = TestRequest. Then finally if I don't receive a reply to the second = TestRequest I am supposed to log out. But If I do I process the single = reply and proceed normally. I've solved the problem though. I edited SessionState.h and changed: bool needTestRequest() const { UtcTimeStamp now; =09 //START = CHANGE:******************************************************************= ****** if(( (now - lastReceivedTime()) >=3D 1.2*heartBtInt() ) && = (testRequest() =3D=3D 0)) return true; else if(( (now - lastReceivedTime()) >=3D 2.2*heartBtInt()) && = (testRequest() =3D=3D 1)) return true; return false; //END = CHANGE:******************************************************************= ******** /*START OLD = CODE:********************************************************************= **** return ( now - lastReceivedTime() ) >=3D ( ( 1.2 * ( ( double ) testRequest() + 1 ) ) * ( double ) = heartBtInt() ); END OLD = CODE:********************************************************************= ********/ } I realize this isn't a problem with QuickFix as it is in line with the = FIX 4.2 specs and the CME isn't. But I have found a case where QuickFix isn't FIX 4.2 complient. = According to the FIX 4.2 specs: Version 4.2 with Errata 20010501 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. The problem is when I manually initiate a logon message with the = ResetSeqNumFlag set to Y and the MsgSeqNum set to 1 (while already = logged on). I get a matching logon message from the acceptor. This trips = the invalid logon message exception and I am logged out. What it should = do is reset the message sequence numbers and discard all old messages = from the queue. I haven't tested the flip side of this problem, when the = acceptor initiates this process. But I am sure it will trip the same = exception and log out. Any suggestions? --Shane -----Original Message----- From: Oren Miller [mailto:or...@qu...]=20 Sent: 03 March 2005 14:15 To: Shane Ryan Cc: qui...@li... Subject: Re: [Quickfix-developers] Generating two Test requests in a row Are you saying you need to send out two test requests whenever QuickFIX=20 initiates one, or you need to respond twice when you receive a test=20 request from iLink, or both? --oren On Mar 1, 2005, at 11:34 AM, Shane Ryan wrote: > Has anyone gone through the CME iLink 2.0 certification process=20 > before, and if so have they figured out how to make quickfix generate=20 > two TestRequest messages in a row? > > =A0 > > I know iLinks behaviour is not inline with the FIX 4.2 specs but I=20 > don't think I'll be able to get them to change it. > > =A0 > > If anyone knows a quick patch, I can do to make it work as per the=20 > iLink specs it would be appreciated. > > =A0 > > =A0 > > Thanks, > > =A0 > > Shane |