<div dir="ltr"><div class="gmail_default" style="font-size:small;color:#000000">I believe Phillip's answer is the correct one.</div><div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">

Some kind of OnDisconnect callback feature has been suggested.  I think someone might even be looking into it.  But we don't have it right now.  I think it would be a very good feature to have.</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, Oct 21, 2013 at 12:16 PM, Phillip Wei <span dir="ltr"><<a href="mailto:pwei@bluemountaincapital.com" target="_blank">pwei@bluemountaincapital.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="color:#1f497d">I don’t think QuickFix should call FromApp in this scenario.  FromApp should only be called for incoming valid messages, and in this case, it’s not valid. 
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">There’s definitely an argument to be made for giving clearer visibility into how the logout was triggered – but that would involve a change to the source code.  I don’t see a way to capture the problem scenario
 you wish to capture with QuickFIX/n as it currently exists (i.e. if you just include it as a dll), but it wouldn’t be hard to extend the source code to do what you want.  Download the source code, follow the instructions to build it, and include it in your
 project.  Update DoTargetTooLow/High in Session.cs to do what additional handling you wish to do.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Phil<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:quickfixn-bounces@lists.quickfixn.com" target="_blank">quickfixn-bounces@lists.quickfixn.com</a> [mailto:<a href="mailto:quickfixn-bounces@lists.quickfixn.com" target="_blank">quickfixn-bounces@lists.quickfixn.com</a>]
<b>On Behalf Of </b>Gaull, James<br>
<b>Sent:</b> Monday, October 21, 2013 12:48 PM<br>
<b>To:</b> <a href="mailto:quickfixn@lists.quickfixn.com" target="_blank">quickfixn@lists.quickfixn.com</a><br>
<b>Subject:</b> {{Quickfixn}} FromApp not being called Onlogout<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">Hello,<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><br>
I’m pretty new to QuickFIX.  I’m using version 1.4.0.0 of the QuickFIX.dll in a C# Winforms application.  I want to test what my application will do if the message sequence number that I receive from the server doesn’t match the sequence number I’m expecting. 
 After changing the NextTargetMsgSeqNum on my session, my application logs out and I see 2 messages related to this in the “.event.current.log”.<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><a href="tel:20131021-13" value="+12013102113" target="_blank">20131021-13</a>:29:06.435 : Verify failed: MsgSeqNum too low, expecting 20 but received 2<u></u><u></u></span></p>


<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><a href="tel:20131021-13" value="+12013102113" target="_blank">20131021-13</a>:29:06.437 : Session FIX.4.2:SenderId->TargetId disconnecting: Verify failed: MsgSeqNum too low, expecting 20 but received 2<u></u><u></u></span></p>


<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">The problem that I’m having is that the FromApp function isn’t being called before OnLogout so I can’t capture the message about the sequence number mismatching.  I want
 to send an e-mail to myself if this situation occurs.<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">Here’s my config:<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">[DEFAULT]<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">ConnectionType=initiator<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">ReconnectInterval=2<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">FileStorePath=c:\FIX\store<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">FileLogPath= c:\FIX\log<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">StartTime=00:00:00<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">EndTime=00:00:00<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">UseDataDictionary=Y<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">DataDictionary= c:\FIX\dictionary\FIX42.xml<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">SocketConnectHost=127.0.0.1<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">SocketConnectPort=5000<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">ResetOnLogon=Y<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">SendResetSeqNum=Y<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""># standard config elements<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">[SESSION]<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">BeginString=FIX.4.2<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">SenderCompID=SenderId<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">TargetCompID=TargetId<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">HeartBtInt=30<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Any help is appreciated.  Thanks for your time!</span><u></u><u></u></p>
</div></div></div>
<br>
<hr>
<font face="Arial" color="Black" size="1">This e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action
 in reliance upon, the information in this e-mail by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this in error, please contact the sender and delete the material from any computer.<br>


<br>
This communication is for informational purposes only. It is not intended as and does not constitute an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and
 other information are not warranted as to completeness or accuracy and are subject to change without notice. Any expected returns are provided for illustrative purposes only and are not intended to serve as, and must not be relied upon by any prospective investor
 as, a guaranty, an assurance, a prediction of a definitive statement of fact or a probability. Investment in funds managed by BlueMountain carries certain risks, including the risk of loss of principal. Unless indicated otherwise, performance results are presented
 net of fees and expenses. Certain market and economic events having an impact on performance may not repeat themselves. Any comments or statements made herein do not necessarily reflect those of BlueMountain Capital Management, LLC or its affiliates. PAST
 RESULTS ARE NOT NECESSARILY INDICATIVE OF FUTURE RESULTS AND NO REPRESENTATION IS MADE THAT RESULTS SIMILAR TO THOSE SHOWN CAN BE ACHIEVED.<br>
</font>
</div>

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