<div dir="ltr"><div class="gmail_default" style="font-size:small;color:#000000">You should definitely not handle this or any other sequence number problems in code.</div><div class="gmail_default" style="font-size:small;color:#000000">
<br></div><div class="gmail_default" style="font-size:small;color:#000000">I'm guessing you reset your local state during mid-session (you probably deleted your store file during a recompile or something). Your counterparty does not expect you to do that, and expects you to resume the connection with the last seq numbers.</div>
<div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">An easy way to correct this is to edit your app's seqnums file to be the seqnums that your counterparty is expecting (which you can see from that logon failure). (The fine contains two seqnums, one for incoming and one for outgoing.)</div>
<div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">This should never actually happen in production, as you probably won't be stopping/starting your app mid-session, and you certainly wouldn't be doing things that would cause the store to get deleted/reset.</div>
<div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 6, 2014 at 1:42 PM, Manuel Lopez <span dir="ltr"><<a href="mailto:lopez.post@gmail.com" target="_blank">lopez.post@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is likely some issue with my setting, but I'm trying to figure<br>
out how to deal with out of synch messages. The error is:<br>
58=MsgSeqNum too low, expecting 279 but received 9<br>
Or is this something I should be handling in code? Any pointers are<br>
appreciated--I may easily have overlooked something obvious. Thanks.<br>
<br>
My counterparty says:<br>
"Do not use 141=Y on your session. It is important that sequence<br>
numbers are ONLY reset at the end of each trading day. In the event<br>
of a disconnection our FIX engines can recover any missed messages on<br>
reconnect. Always send a logout message when you cleanly disconnect<br>
your application. This allows us to shutdown your session cleanly and<br>
identify that you have logged out in a normal manner. If you<br>
disconnect without sending a logout, we will assume you have<br>
disconnected abnormally and that there is a problem."<br>
<br>
Here is my config file:<br>
<br>
# default settings for sessions<br>
[DEFAULT]<br>
PersistMessages=Y<br>
FileStorePath=msgs<br>
FileLogPath=logs<br>
ConnectionType=initiator<br>
UseLocalTime=Y<br>
StartTime=18:00:00<br>
EndTime=16:59:00<br>
<br>
# session definition<br>
[SESSION]<br>
BeginString=FIX.4.4<br>
SenderCompID=myID<br>
TargetCompID=theirID<br>
ReconnectInterval=30<br>
HeartBtInt=60<br>
LogonTimeout=10<br>
LogoffTimeout=10<br>
SocketConnectPort=n<br>
SocketConnectHost=n.n.n.n<br>
MillisecondsInTimeStamp=N<br>
ResetOnLogout=N<br>
ResetOnDisconnect=N<br>
RefreshOnLogon=Y<br>
EnableLastMsgSeqNumProcessed=N<br>
MaxMessagesInResendRequest=0<br>
SendLogoutBeforeDisconnectFromTimeout=Y<br>
IgnorePossDupResendRequests=N<br>
ValidateFieldsOutOfOrder=Y<br>
ValidateFieldsHaveValues=Y<br>
ValidateUserDefinedFields=Y<br>
RequiresOrigSendingTime=Y<br>
UseDataDictionary=Y<br>
DataDictionary=spec/fix/FIX44.xml<br>
_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font><span style="background-color:#000000"><span style="background-color:#ffffff">Grant Birchmeier</span></span></font><font><font color="#3333ff"><br></font></font></div>
<div><font><b><font color="#3333ff"><span style="background-color:#ffcc33"><span style="background-color:#ffcc66"><span style="background-color:#ffcc99"><span style="background-color:#ffffff"><span style="background-color:#ffcc00">Connamara Systems, LLC</span></span></span></span></span></font></b></font><br>
</div><div><font><b>Made-To-Measure Trading Solutions.</b></font></div><div><font>Exactly what you need. No more. No less.</font><font><b><font color="#3333ff"><br></font></b></font></div><div><font><a href="http://connamara.com" target="_blank">http://connamara.com</a><br>
</font></div>
</div>