[QFJ-831] 35=2 after 35=4 failed because "MsgSeqNum too low" Created: 06/Apr/15  Updated: 13/Apr/15  Resolved: 13/Apr/15

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.5.3
Fix Version/s: None

Type: Bug Priority: Default
Reporter: Shi Lei Assignee: Unassigned
Resolution: Not a bug Votes: 0
Labels: None
Environment:

AIX



 Description   

This scenario happened in a poor network environment where some messages are missing but heartbeat still working, no logout before issue happened:

1. My app is client side using quickfixj-all-1.5.3.jar.
2. When network has problem, some messages are missing (both sides)
3. Sometimes server side send 35=4 request to increase seq_no by 1 while there's no missing seq_no from server side. E.g.
34=100, 35=8......
34=101, 35=8......
34=102, 35=4, 36=103, 123=Y...
I don't know why server side send this 35=4 asking to reset seq_no to 103 (seq_no 100 and 101 received successfully and 102 is reset request itself)
4. If next message from server side is 34=103, 35=8, it's OK
if next message from server side is 35=103, 35=2, client side FIX engine will return "MsgSeqNum too low, expecting 103 but received 102"

The question is
1) why 35=2 after 35=4 fail while 35=8 after 35=4 OK
2) the seq_no of failed 35=4 after 35=2, I double checked it's 103, why response is "MsgSeqNum too low, expecting 103 but received 102"



 Comments   
Comment by Christoph John [ 13/Apr/15 ]

Could you please send a message to the user list with the complete messages from the message log (at least the messages 100 - 103 from above)?
https://lists.sourceforge.net/lists/listinfo/quickfixj-users

Thanks

Comment by Shi Lei [ 13/Apr/15 ]

Hi Christoph,
Please find original message from our side fix engine log below, and refer to the story how these messages generated – all messages are incoming one except the reject message and logon request after rejection:

1) some incoming 35=8 (ignore older one and keep last two 34=8120 and 34=8121. server side is 49=087003)
2) single 35=4 (34=8122 requests new seq_no set to 8124, server side says it's due to network package loss detected)
3) next message 35=8 34=8124 received no problem
4) 35=4 again, this time there's a 35=2 message after it (35=4, 34=8125 requests new seq_no set to 8126; then 35=2 use new seq_no 34=8126)
5) our side fix engine reject message, reason "MsgSeqNum too low, expecting 8126 but received 8125" – according to this reject reason I'm not sure which message got rejected – if 1st one with 35=4, 34=8125 rejected then "excepting" should be still 8125; if 2nd one with 35=2, 34=8126 rejected then rejected one has 34=8126, not too low
6) disconnected and re-connect

8=FIXT.1.1^A9=0426^A35=8^A49=087003^A56=RHBInvest^A34=8120^A50=087909^A57=99^A43=Y^A97=N^A52=20150330-02:44:52^A122=20150330-02:43:52^A37=201503300083409551^
A11=0RHB43U22408770^A453=3^A448=589^A447=C^A452=11^A448=087001-TA3979^A447=C^A452=3^A448=066^A447=C^A452=17^A880=20150330-00037299^A17=37299S^A150=F^A39=2^A1
=035450402^A55=HEVEA^A48=5095^A22=99^A762=NM^A54=2^A38=1000^A40=2^A44=2.9900^A59=0^A529=R^A32=1000^A31=2.9900^A151=0^A14=1000^A6=2.9900^A60=20150330-02:43:54
.206^A381=2990.00^A10=183^A
8=FIXT.1.1^A9=0426^A35=8^A49=087003^A56=RHBInvest^A34=8121^A50=087909^A57=99^A43=Y^A97=N^A52=20150330-02:44:52^A122=20150330-02:43:52^A37=201503300083409577^
A11=0RHB43U22408990^A453=3^A448=589^A447=C^A452=11^A448=087001-YO0391^A447=C^A452=3^A448=066^A447=C^A452=17^A880=20150330-00037300^A17=37300S^A150=F^A39=2^A1
=050626332^A55=HEVEA^A48=5095^A22=99^A762=NM^A54=2^A38=1000^A40=2^A44=2.9900^A59=0^A529=R^A32=1000^A31=2.9900^A151=0^A14=1000^A6=2.9900^A60=20150330-02:43:54
.206^A381=2990.00^A10=170^A
8=FIXT.1.1^A9=0097^A35=4^A49=087003^A56=RHBInvest^A34=8122^A50=087909^A57=99^A43=N^A97=N^A52=20150330-02:44:52^A123=Y^A36=8124^A10=116^A
8=FIXT.1.1^A9=0431^A35=8^A49=087003^A56=RHBInvest^A34=8124^A50=087909^A57=99^A43=Y^A97=N^A52=20150330-02:44:52^A122=20150330-02:44:16^A37=201503300083409631^
A11=0RHB43U22410750^A453=3^A448=667^A447=C^A452=11^A448=087001-LI1262^A447=C^A452=3^A448=098^A447=C^A452=17^A880=20150330-00037414^A17=37414S^A150=F^A39=1^A1
=048063804^A55=KTB^A48=4847^A22=99^A762=NM^A54=2^A38=50000^A40=2^A44=0.3250^A59=0^A529=R^A32=10000^A31=0.3250^A151=2300^A14=47700^A6=0.3250^A60=20150330-02:4
4:16.574^A381=15502.50^A10=095^A
8=FIXT.1.1^A9=0097^A35=4^A49=087003^A56=RHBInvest^A34=8125^A50=087909^A57=99^A43=N^A97=N^A52=20150330-02:44:52^A123=Y^A36=8126^A10=121^A
8=FIXT.1.1^A9=0098^A35=2^A49=087003^A56=RHBInvest^A34=8126^A50=087909^A57=99^A43=N^A97=N^A52=20150330-02:44:50^A7=5196^A16=5234^A10=143^A
8=FIXT.1.1^A9=116^A35=5^A34=5236^A49=RHBInvest^A52=20150330-02:44:53.299^A56=087003^A58=MsgSeqNum too low, expecting 8126 but received 8125^A10=086^A
8=FIXT.1.1^A9=109^A35=A^A34=5237^A49=RHBInvest^A52=20150330-02:44:58.810^A56=087003^A553=btx03^A554=Password321#@!^A98=0^A108=30^A1137=8^A10=186^A
8=FIXT.1.1^A9=0121^A35=A^A49=087003^A56=RHBInvest^A34=8128^A50=087909^A57=99^A43=N^A97=N^A52=20150330-02:45:01^A98=0^A108=30^A789=5196^A1137=8^A95=1^A96=0^A1
0=163^A

Generated at Tue Nov 26 08:46:32 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.