[Quickfix-developers] Waiting for automatic ResendRequest to finish?
Brought to you by:
orenmnero
|
From: Edde <edd...@gm...> - 2006-02-20 13:39:00
|
Hi Guys, I'm using the QuickFix JNI library version 1.9.4 (plan to upgrade when QuickFix/J moves to 1.0.0) and I was wondering if there is a way to detect when all messages have been received from an automatic ResendRequest? I experienced a problem with this last week in our production system when our counterparty's system went down for about an hour. After they had rebooted their system and we could log on again QuickFix did the automatic ResendRequest to get any messages missed during the downtime: 20060216-14:26:00 : 15:26:00.350 - MsgSeqNum too high, expecting 13817 but received 66426 EDDE -> 15:26:00.360 - 8=3D FIX.4.2=019=3D67=0135=3D2=0134=3D32889=0149=3DEDDE=0152=3D20060216-14:26:00= .350=0156=3DXXXX=017=3D13817=0116=3D0=0110=3D235=01 Since it needed to resend 50000 messages this takes some time and while thi= s is in progress our system continues the startup process. I'm planning to rewrite this code ASAP but at the moment what we do after a major crash on either end is to clear all our databases and send a ResendRequest demanding all messages sent in the session: EDDE -> 15:28:10.177 - 8=3D FIX.4.2=019=3D67=0135=3D2=0134=3D32910=0149=3DEDDE=0152=3D20060216-14:28:10= .157=0156=3DXXXX=017=3D1=0116=3D0=0110=3D228=01 The problem this time is that since I'm still receiving messages from the first ResendRequest code I will get an unexpected sequence number as the answer to my latest ResendRequest: XXXX -> 15:28:10.177 - 8=3D FIX.4.2=019=3D375=0135=3D8=0134=3D56802=0143=3DY=0149=3DXXXX=0152=3D2006021= 6-14:28:08.234..... 20060216-14:28:10 : 15:28:10.177 - MsgSeqNum too high, expecting 2 but received 56802 20060216-14:28:10 : 15:28:10.177 - Sent ResendRequest FROM: 2 TO: 0 EDDE -> 15:28:10.177 - 8=3D FIX.4.2=019=3D63=0135=3D2=0134=3D32911=0149=3DEDDE=0152=3D20060216-14:28:10= .177=0156=3DXXXX=017=3D2=0116=3D0=0110=3D017=01 So, for each message I receive between 56802 and 66426 QuickFIX automatically sends a new ResendRequest demanding all messages in the session. Obviously this is not good behaviour and I could work around this if there is a way to know when the first ResendRequest has received all the messages it's expecting. Anyone know if there is a way to detect this? Thanks, /Eddie I've put together a snapshot of the session logs to illustrate the problem (XXXX is my counterparty): 20060216-14:25:56 : 15:25:56.234 - Created session 20060216-14:25:56 : 15:25:56.415 - Connecting to 192.42.172.11 on port 7474 20060216-14:25:56 : 15:25:56.475 - Connection succeeded EDDE -> 15:25:56.565 - 8=3D FIX.4.2=019=3D67=0135=3DA=0134=3D32888=0149=3DEDDE=0152=3D20060216-14:25:56= .495=0156=3DXXXX=0198=3D0=01108=3D180=0110=3D014=01 20060216-14:25:56 : 15:25:56.565 - Initiated logon request XXXX -> 15:26:00.350 - 8=3D FIX.4.2=019=3D67=0135=3DA=0134=3D66426=0149=3DXXXX=0152=3D20060216-14:25:59= .177=0156=3DEDDE=0198=3D0=01108=3D180=0110=3D009=01 20060216-14:26:00 : 15:26:00.350 - Received logon response 20060216-14:26:00 : 15:26:00.350 - MsgSeqNum too high, expecting 13817 but received 66426 EDDE -> 15:26:00.360 - 8=3D FIX.4.2=019=3D67=0135=3D2=0134=3D32889=0149=3DEDDE=0152=3D20060216-14:26:00= .350=0156=3DXXXX=017=3D13817=0116=3D0=0110=3D235=01 20060216-14:26:00 : 15:26:00.360 - Sent ResendRequest FROM: 13817 TO: 0 EDDE -> 15:26:06.389 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32890=0149=3DEDDE=0152=3D20060216-14:26:06= .389=0156=3DXXXX=01112=3DTestOS, 15:26:06=0110=3D206=01 EDDE -> 15:26:09.393 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32891=0149=3DEDDE=0152=3D20060216-14:26:09= .393=0156=3DXXXX=01112=3DTestOS, 15:26:09=0110=3D208=01 EDDE -> 15:26:12.397 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32892=0149=3DEDDE=0152=3D20060216-14:26:12= .397=0156=3DXXXX=01112=3DTestOS, 15:26:12=0110=3D201=01 EDDE -> 15:26:15.402 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32893=0149=3DEDDE=0152=3D20060216-14:26:15= .402=0156=3DXXXX=01112=3DTestOS, 15:26:15=0110=3D195=01 EDDE -> 15:26:18.406 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32894=0149=3DEDDE=0152=3D20060216-14:26:18= .406=0156=3DXXXX=01112=3DTestOS, 15:26:18=0110=3D206=01 EDDE -> 15:26:21.410 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32895=0149=3DEDDE=0152=3D20060216-14:26:21= .410=0156=3DXXXX=01112=3DTestOS, 15:26:21=0110=3D190=01 EDDE -> 15:26:24.415 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32896=0149=3DEDDE=0152=3D20060216-14:26:24= .415=0156=3DXXXX=01112=3DTestOS, 15:26:24=0110=3D202=01 EDDE -> 15:26:27.419 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32897=0149=3DEDDE=0152=3D20060216-14:26:27= .419=0156=3DXXXX=01112=3DTestOS, 15:26:27=0110=3D213=01 EDDE -> 15:26:30.423 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32898=0149=3DEDDE=0152=3D20060216-14:26:30= .423=0156=3DXXXX=01112=3DTestOS, 15:26:30=0110=3D197=01 EDDE -> 15:26:33.428 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32899=0149=3DEDDE=0152=3D20060216-14:26:33= .428=0156=3DXXXX=01112=3DTestOS, 15:26:33=0110=3D209=01 EDDE -> 15:26:36.432 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32900=0149=3DEDDE=0152=3D20060216-14:26:36= .432=0156=3DXXXX=01112=3DTestOS, 15:26:36=0110=3D193=01 EDDE -> 15:26:39.436 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32901=0149=3DEDDE=0152=3D20060216-14:26:39= .436=0156=3DXXXX=01112=3DTestOS, 15:26:39=0110=3D204=01 EDDE -> 15:26:42.441 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32902=0149=3DEDDE=0152=3D20060216-14:26:42= .441=0156=3DXXXX=01112=3DTestOS, 15:26:42=0110=3D189=01 EDDE -> 15:26:45.445 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32903=0149=3DEDDE=0152=3D20060216-14:26:45= .445=0156=3DXXXX=01112=3DTestOS, 15:26:45=0110=3D200=01 EDDE -> 15:26:48.449 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32904=0149=3DEDDE=0152=3D20060216-14:26:48= .449=0156=3DXXXX=01112=3DTestOS, 15:26:48=0110=3D211=01 EDDE -> 15:26:51.454 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32905=0149=3DEDDE=0152=3D20060216-14:26:51= .454=0156=3DXXXX=01112=3DTestOS, 15:26:51=0110=3D196=01 EDDE -> 15:26:54.458 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32906=0149=3DEDDE=0152=3D20060216-14:26:54= .458=0156=3DXXXX=01112=3DTestOS, 15:26:54=0110=3D207=01 EDDE -> 15:26:57.462 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32907=0149=3DEDDE=0152=3D20060216-14:26:57= .462=0156=3DXXXX=01112=3DTestOS, 15:26:57=0110=3D209=01 EDDE -> 15:27:00.467 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32908=0149=3DEDDE=0152=3D20060216-14:27:00= .467=0156=3DXXXX=01112=3DTestOS, 15:27:00=0110=3D193=01 EDDE -> 15:27:03.471 - 8=3D FIX.4.2=019=3D76=0135=3D1=0134=3D32909=0149=3DEDDE=0152=3D20060216-14:27:03= .471=0156=3DXXXX=01112=3DTestOS, 15:27:03=0110=3D195=01 XXXX -> 15:27:04.112 - 8=3D FIX.4.2=019=3D370=0135=3D8=0134=3D13817=0143=3DY=0149=3DXXXX=0152=3D2006021= 6-14:27:02.934=0156=3DEDDE=01122=3D20060216-09:00:57.849=011=3D311761=016= =3D0.000000=0111=3DISTSE0000170110-OL6825p=0114=3D0.000000=0115=3DSEK=0117= =3D1140088724=0120=3D0=0122=3D4=0131=3D0.000000=0132=3D0.000000=0137=3D1376= 4816=0138=3D199.000000=0139=3D4=0140=3D2=0144=3D98=0148=3DSE0000170110=0154= =3D1=0155=3DAZA=0158=3DUnsolicitedorder cancellation=0159=3D3=01109=3D311761=01150=3D4=01151=3D 0.000000=01198=3D20060216100057986548=01207=3DST=0110=3D030=01 XXXX -> 15:27:04.222 - 8=3D FIX.4.2=019=3D375=0135=3D8=0134=3D13818=0143=3DY=0149=3DXXXX=0152=3D2006021= 6-14:27:02.936=0156=3DEDDE=01122=3D20060216-09:00:58.349=011=3D311761=016= =3D0.000000=0111=3DISTSE0000314502-OL6826p=0114=3D0.000000=0115=3DSEK=0117= =3D1140088725=0120=3D0=0122=3D4=0131=3D0.000000=0132=3D0.000000=0137=3D1376= 4817=0138=3D455.000000=0139=3D4=0140=3D2=0144=3D34.5=0148=3DSE0000314502=01= 54=3D2=0155=3DSALAB=0158=3DUnsolicited order cancellation=0159=3D3=01109=3D311761=01150=3D4=01151=3D 0.000000=01198=3D20060216100058475000=01207=3DST=0110=3D020=01 XXXX -> ETC, ETC... Until the last message 34=3D66426 20060216-14:27:14 : 15:27:14.226 - Received SequenceReset FROM: 20675 TO: 20676 20060216-14:27:14 : 15:27:14.387 - Received SequenceReset FROM: 20766 TO: 20767 20060216-14:27:53 : 15:27:53.653 - Received SequenceReset FROM: 46393 TO: 46394 20060216-14:27:55 : 15:27:55.456 - Received SequenceReset FROM: 47614 TO: 47615 20060216-14:28:02 : 15:28:02.306 - Received SequenceReset FROM: 52242 TO: 52245 20060216-14:28:02 : 15:28:02.306 - Received SequenceReset FROM: 52248 TO: 52263 20060216-14:28:02 : 15:28:02.306 - Received SequenceReset FROM: 52264 TO: 52306 20060216-14:28:02 : 15:28:02.316 - Received SequenceReset FROM: 52319 TO: 52320 20060216-14:28:04 : 15:28:04.789 - Received SequenceReset FROM: 53725 TO: 53726 EDDE -> 15:28:10.177 - 8=3D FIX.4.2=019=3D67=0135=3D2=0134=3D32910=0149=3DEDDE=0152=3D20060216-14:28:10= .157=0156=3DXXXX=017=3D1=0116=3D0=0110=3D228=01 XXXX -> 15:28:10.177 - 8=3D FIX.4.2=019=3D375=0135=3D8=0134=3D56802=0143=3DY=0149=3DXXXX=0152=3D2006021= 6-14:28:08.234=0156=3DEDDE=01122=3D20060216-12:37:06.916=011=3D311761=016= =3D0.000000=0111=3DISTSE0000567752-OL27946p=0114=3D0.000000=0115=3DSEK=0117= =3D1140131699=0120=3D0=0122=3D4=0131=3D0.000000=0132=3D0.000000=0137=3D1378= 7749=0138=3D92.000000=0139=3D0=0140=3D2=0144=3D26.7000007629395=0148=3DSE00= 00567752=0154=3D2=0155=3DNTEKB=0159=3D3=0160=3D20060216-12:37:07=01109=3D31= 1761=01150=3D0=01151=3D 92.000000=01198=3D20060216133708358461=01207=3DST=0110=3D146=01 20060216-14:28:10 : 15:28:10.177 - MsgSeqNum too high, expecting 2 but received 56802 20060216-14:28:10 : 15:28:10.177 - Sent ResendRequest FROM: 2 TO: 0 EDDE -> 15:28:10.177 - 8=3D FIX.4.2=019=3D63=0135=3D2=0134=3D32911=0149=3DEDDE=0152=3D20060216-14:28:10= .177=0156=3DXXXX=017=3D2=0116=3D0=0110=3D017=01 XXXX -> 15:28:10.177 - 8=3D FIX.4.2=019=3D376=0135=3D8=0134=3D56803=0143=3DY=0149=3DXXXX=0152=3D2006021= 6-14:28:08.236=0156=3DEDDE=01122=3D20060216-12:37:06.950=011=3D311761=016= =3D0.000000=0111=3DISTSE0000115446-OL27943p=0114=3D0.000000=0115=3DSEK=0117= =3D1140131700=0120=3D0=0122=3D4=0131=3D0.000000=0132=3D0.000000=0137=3D1378= 7746=0138=3D39.000000=0139=3D4=0140=3D2=0144=3D345.5=0148=3DSE0000115446=01= 54=3D1=0155=3DVOLVB=0158=3DUnsolicited order cancellation=0159=3D3=01109=3D311761=01150=3D4=01151=3D 0.000000=01198=3D20060216133707359386=01207=3DST=0110=3D133=01 20060216-14:28:10 : 15:28:10.177 - MsgSeqNum too high, expecting 2 but received 56803 EDDE -> 15:28:10.177 - 8=3D FIX.4.2=019=3D63=0135=3D2=0134=3D32912=0149=3DEDDE=0152=3D20060216-14:28:10= .177=0156=3DXXXX=017=3D2=0116=3D0=0110=3D018=01 20060216-14:28:10 : 15:28:10.177 - Sent ResendRequest FROM: 2 TO: 0 |