Re: [Quickfix-developers] Message sequence number greater than expected
Brought to you by:
orenmnero
|
From: Dave L. <dav...@ma...> - 2006-07-14 15:00:32
|
> I have a client application using a SocketInitiator. This=20 > application only sends the logon a datamarketrequest and when > the application is closed a logout is sent. But is seems that > when the socketinitiatior is disposed a logout message is sent > automatically (34=3D5). > How are you sending the Logout? Are you calling Logout, e.g.: QuickFix.Session.lookupSession(sessionID).logout(); You can also just stop the initiator and it will automatically complete the logout before disconnecting. If you send a logout using sendToTarget() then quickfix won't be aware that it has initiated the logout, so when it receives the Logout response it treats it like a logout request and responds with a Logout, but the otherside will have disconnected before it receives this additional logout message, hence the resend behaviour. Avoid doing this. > When I open the application again, a resend message is=20 > received asking for the second logout (7=3D5), then the=20 > application resend this message automatically with 34=3D5 again > and then the message 34=3D7, I don't know why the=20 > 34=3D6(logon message) is not resend. When receive the 34=3D7=20 > fails because meff is expecting 34=3D6. > The resend behaviour looks ok to me. First you get a resend request asking for messages from SeqNum 5 onwards (i.e. 7=3D5 and 16=3D0): 8=3DFIX.4.4=019=3D70=0135=3D2=0134=3D14=0152=3D20060714-10:06:53=0149=3DM= EFF=0150=3DM3=0156=3DA880=0157=3D 351=017=3D5=0116=3D0=0110=3D034=01 Your engine responds by sending a gapfill message with SeqNum 5 (i.e. 34=3D5) saying the next expected SeqNum should be 7 (i.e. 36=3D7): 8=3DFIX.4.4=019=3D106=0135=3D4=0134=3D5=0143=3DY=0149=3DA880=0150=3D351=01= 52=3D20060714-10:03:25.250=015 6=3DMEFF=0157=3DM3=01122=3D20060714-10:03:25.250=0136=3D7=01123=3DY=0110=3D= 103=01 ...and the next message sent is with SeqNum 7 (i.e. 34=3D7): 8=3DFIX.4.4=019=3D174=0135=3DV=0134=3D7=0143=3DY=0149=3DA880=0150=3D351=01= 52=3D20060714-10:03:24.609=015 6=3DMEFF=0157=3DM3=01122=3D20060714-10:03:22.906=0122=3D8=0148=3D21=0155=3D= [N/A]=01146=3D1=01262=3D000 0001=01263=3D1=01264=3D0=01265=3D0=01267=3D1=01269=3D6=01461=3DFXXXSX=011= 0=3D221=01 Basically a SequenceReset message was sent in place of messages 5 and 6, which is correct because these messages were originally a logout and a logon and should not be resent. I don't really see why the counterparty ended the session. cheers Dave |