<font size=2 face="sans-serif">Classification: For internal use only<br>
<br>
Hi ,</font>
<br>
<br><font size=2 face="sans-serif">Unfortunately I'm getting stuck again.
</font>
<br>
<br><font size=2 face="sans-serif">According to the log , I think my problem
is related to the sequence number that is expected is different to the
seq number I'm trying to sent . am I right?</font>
<br>
<br><font size=2 face="sans-serif">regarding to a previous e- mail , I
got these doubts :</font>
<br>
<br>
<br><font size=2 face="sans-serif">1)   I debugged the code, when
I try to send the order , I see that the <b><i>Send methods</i></b> are
executed twice. Why? </font>
<br>
<br><font size=2 face="sans-serif">When this line is executed for second
time :</font>
<br>
<br>
<br><font size=1 face="}">   </font><font size=1 color=blue face="}">int</font><font size=1 face="}">
bytesSent = socket_.Send(rawData);</font>
<br>
<br>
<br><font size=2 face="sans-serif">I get the  last event on the log:</font>
<br>
<br><font size=2 face="sans-serif">20131125-22:29:40.220 : Created session</font>
<br><font size=2 face="sans-serif">20131125-22:29:40.274 : Connecting to
172.17.111.23 on port 9002</font>
<br><font size=2 face="sans-serif">20131125-22:29:40.286 : Connection succeeded</font>
<br><font size=2 face="sans-serif"><b>20131125-22:30:14.975 : Connection
failed: An existing connection was forcibly closed by the remote host</b></font>
<br>
<br><font size=2 face="sans-serif">And the order is not sent. </font>
<br>
<br>
<br><font size=2 face="sans-serif">2 , 3  ) Yes , I already tried
:  </font>
<br>
<br><font size=1 face="}">ResetOnLogon=Y</font>
<br><font size=1 face="}">MsgSeqNum=1</font>
<br>
<br>
<br><font size=2 face="sans-serif">But it did't work , and ,  that's
right, I cannot restart the sequence number from the other side every time
i need to run my code since there will be used on automated test cases
, I think I  need to know the next sequence number before sending
 the message. </font>
<br>
<br><font size=2 face="sans-serif">So I think the right settings will be:
</font>
<br>
<br><font size=1 face="}">ResetOnLogon=N</font>
<br>
<br>
<br><font size=2 face="sans-serif">How can I get the last seq number used?
</font>
<br>
<br><font size=2 face="sans-serif">Where  the sequence number is being
set ? </font>
<br>
<br><font size=2 face="sans-serif">Why a zero is sent  here? : </font>
<br>
<br><font size=1 face="}"> </font><font size=1 color=blue face="}">public</font><font size=1 face="}">
</font><font size=1 color=blue face="}">virtual</font><font size=1 face="}">
</font><font size=1 color=blue face="}">bool</font><font size=1 face="}">
Send(</font><font size=1 color=#4181c0 face="}">Message</font><font size=1 face="}">
message)</font>
<br><font size=1 face="}">        {</font>
<br><font size=1 face="}">            message.Header.RemoveField(Fields.</font><font size=1 color=#4181c0 face="}">Tags</font><font size=1 face="}">.PossDupFlag);</font>
<br><font size=1 face="}">            message.Header.RemoveField(Fields.</font><font size=1 color=#4181c0 face="}">Tags</font><font size=1 face="}">.OrigSendingTime);</font>
<br><font size=1 face="}">            </font><font size=1 color=blue face="}">return</font><font size=1 face="}">
SendRaw(message, 0);  </font>
<br><font size=1 face="}">        }</font>
<br>
<br><font size=2 face="sans-serif">I guess the sequence number is taken
from here, so should I add that to the message's header? </font>
<br>
<br><font size=1 face="}"> </font><font size=1 color=blue face="}">protected</font><font size=1 face="}">
</font><font size=1 color=blue face="}">void</font><font size=1 face="}">
Persist(</font><font size=1 color=#4181c0 face="}">Message</font><font size=1 face="}">
message, </font><font size=1 color=blue face="}">string</font><font size=1 face="}">
messageString)</font>
<br><font size=1 face="}">        {</font>
<br><font size=1 face="}">            </font><font size=1 color=blue face="}">if</font><font size=1 face="}">
(</font><font size=1 color=blue face="}">this</font><font size=1 face="}">.PersistMessages)</font>
<br><font size=1 face="}">            {</font>
<br><font size=1 face="}">             
  </font><font size=1 color=blue face="}">int</font><font size=1 face="}">
msgSeqNum = message.Header.GetInt(Fields.</font><font size=1 color=#4181c0 face="}">Tags</font><font size=1 face="}">.MsgSeqNum);</font>
<br><font size=1 face="}">             
  state_.Set(msgSeqNum, messageString);</font>
<br><font size=1 face="}">            }</font>
<br><font size=1 face="}">            state_.IncrNextSenderMsgSeqNum();</font>
<br><font size=1 face="}">        }</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Any  suggestion or guidelines would
be really appreciated! </font>
<br>
<br><font size=2 face="sans-serif">Thanks & regards! <br>
</font>
<br><font size=2 face="sans-serif"><br>
<br>
<br>
********************************************************************************************************<br>
This email is sent to you by Infosys Limited on behalf of Deutsche Bank.<br>
Diese email wurde Ihnen von Infosys Limited im Auftrag der Deutschen Bank
gesendet<br>
*********************************************************************************************************
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Ashutosh Mishra <A.Mishra@ny.tr.mufg.jp></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">Mailing list for QuickFIX/n <quickfixn@lists.quickfixn.com>,
</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">11/26/2013 09:35 AM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: {{Quickfixn}} Log In troubles [I]</font></table>
<br>
<hr noshade>
<br>
<br>
<br><font size=2 color=#004080 face="Calibri">Hi Grant,</font>
<br><font size=2 color=#004080 face="Calibri">       
        Thanks for the reply. Got lot of things resolved
by your reply.</font>
<br><font size=2 color=#004080 face="Calibri"> </font>
<div><font size=2 color=#4181c0 face="Arial">Thanks & Regards,</font>
<br><font size=2 color=#4181c0 face="Arial">Ashutosh Mishra</font>
<br><font size=3 face="MS PMincho"> </font>
<br><font size=3 face="MS PMincho">*********************************************************************************</font>
<br><font size=3 face="MS PMincho">This communication (including any attachments)
is intended only or the use of the individual whom it is addressed and
may contain information that is privileged, confidential or legally protected.
 If the reader of this message is not the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited. If you have received this communication
in error, please notify us immediately by replying to the message.  Please
also delete the message and its attachments, if any, from your computer
and destroy any hard copies you may have created.  Thank you for your
cooperation. </font>
<br><font size=3 face="MS PMincho">*********************************************************************************</font>
<br><font size=2 color=#004080 face="Calibri"> </font>
<br><font size=2 face="Tahoma"><b>From:</b> quickfixn-bounces@lists.quickfixn.com
[</font><a href="mailto:quickfixn-bounces@lists.quickfixn.com"><font size=2 face="Tahoma">mailto:quickfixn-bounces@lists.quickfixn.com</font></a><font size=2 face="Tahoma">]
<b>On Behalf Of </b>Grant Birchmeier<b><br>
Sent:</b> Monday, November 25, 2013 5:13 PM<b><br>
To:</b> Mailing list for QuickFIX/n<b><br>
Subject:</b> Re: {{Quickfixn}} Log In troubles [I]</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=3 face="Times New Roman">1) </font>
<br><font size=3 face="Times New Roman">The message </font>
<br><font size=3 face="Times New Roman">"</font>
<br><font size=3 face="Times New Roman">An Existing connection was forcibly
closed by the remote host</font>
<br><font size=3 face="Times New Roman">" means that the other side
is terminating the connection.  You may not know why.</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=3 face="Times New Roman">2) </font>
<br><font size=3 face="Times New Roman">"</font>
<br><font size=3 face="Times New Roman">MsgSeqNum</font>
<br><font size=3 face="Times New Roman">=1" -- Ashutosh, I don't know
what this means.  That's not a setting.  If you put it in your
config, QF will ignore it.</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=3 face="Times New Roman">3) Asking the other side to reset
their sequence numbers is not a great idea.  They'll probably refuse.</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=3 face="Times New Roman">Your ResetOnXXX settings must match
up with their interface.  If they don't reset on logon, you shouldn't
either.  You can manually edit your .seqnums file between app executions
to match their expectation, or you can let the transport layer fix itself
with resend requests or whatnot.  (I forget the exact msg flow at
the moment; in some scenarios the two sides will work it out, in others
they won't.)</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=3 face="Times New Roman"> </font><tt><font size=2>_______________________________________________<br>
Quickfixn mailing list<br>
Quickfixn@lists.quickfixn.com<br>
</font></tt><a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com"><tt><font size=2>http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</font></tt></a><tt><font size=2><br>
</font></tt>
<br>
<br></div>
<br><font size="1" face="Arial">---</font><br>
<font size="2" face="Courier New">This communication may contain confidential and/or privileged information.<br>
If you are not the intended recipient (or have received this communication<br>
in error) please notify the sender immediately and destroy this<br>
communication. Any unauthorized copying, disclosure or distribution of the<br>
material in this communication is strictly forbidden.<br>
<br>
Deutsche Bank does not render legal or tax advice, and the information<br>
contained in this communication should not be regarded as such.</font>