QuickFIX/J

MsgSeqNum too low

Details

  • Type: Other Other
  • Status: Closed Closed
  • Priority: Default Default
  • Resolution: Fixed
  • Affects Version/s: 1.4.0
  • Fix Version/s: None
  • Component/s: Engine
  • 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.
Thank you.

Activity

Hide
alexey palamarchuk added a comment - 01/Jul/09 10:11 AM

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);
			}
		}
Show
alexey palamarchuk added a comment - 01/Jul/09 10:11 AM 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);
			}
		}
Hide
Paul Bobba added a comment - 08/Jan/10 4:51 PM

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);

Show
Paul Bobba added a comment - 08/Jan/10 4:51 PM 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);

People

Vote (1)
Watch (3)

Dates

  • Created:
    30/Jun/09 4:09 PM
    Updated:
    20/Mar/11 12:07 PM
    Resolved:
    20/Mar/11 12:07 PM