[QFJ-447] MsgSeqNum too low Created: 30/Jun/09 Updated: 20/Mar/11 Resolved: 20/Mar/11 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Engine |
Affects Version/s: | 1.4.0 |
Fix Version/s: | None |
Type: | Other | Priority: | Default |
Reporter: | alexey palamarchuk | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Labels: | None | ||
Environment: |
Windows XP |
Description |
Dear colleagues. My integration component (listener of a FIX server) is based on QuickFix/J library. Component keeps working continuesly for a days; every midnight FIX server initiates relogon (or my component resores connection after failure). On every logon, I request FIX server to reset the sequence number. That some times (can't provide the strong algorythm to reproduce issue) causes the issue: "MsgSeqNum too low, expecting 10656 but received 1" As I discovered, internal session state was not reset before relogon and I tryied to logon with old sequence number values. As a solution, I overwrote toAdmin message where I explicitly reset session state before started loggon on FIX server. Can you kindly provide solution for this issue, and give your opinion about solution that I currently use. |
Comments |
Comment by alexey palamarchuk [ 01/Jul/09 ] |
Here is the code which is to reset session state: quickfix.Session session = quickfix.Session.lookupSession(sessionId); if(session != null) { try { session.getStore().reset(); } catch(Exception ex) { log.error(ex.getMessage(), ex); } } |
Comment by Paul Bobba [ 08/Jan/10 ] |
I have been able to capture this scenario and access the session object through JMX and invoked the reset() method. The reset method fails to reset the sequence number. If i manually set the NextTargetMsgSeqNum through JMX the logon process is successful. Unfortunately, once disconnected again the session relapses into this state of repeated logon attempts because our session is somehow unable to reset this number. We are looking at resolving this issue by doing the same in the code as we do through jmx. session.setNextTargetMsgSeqNum(1); |