{{Quickfixn}} Log In troubles [I]

Erika Hernandez erika.hernandez at db.com
Mon Nov 25 14:40:19 PST 2013


Classification: For internal use only

Hi , 


1)   I debugged the code, when I try to send the order , I see that the 
Send methods are executed twice. Why? 

When this line is executed for second time :


   int bytesSent = socket_.Send(rawData);


I get the  last event on the log:

20131125-22:29:40.220 : Created session
20131125-22:29:40.274 : Connecting to 172.17.111.23 on port 9002
20131125-22:29:40.286 : Connection succeeded
20131125-22:30:14.975 : Connection failed: An existing connection was 
forcibly closed by the remote host

And the order is not sent. 


2 , 3  ) Yes , I already tried : 

ResetOnLogon=Y
MsgSeqNum=1


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. 

So I think the right settings will be: 

ResetOnLogon=N


How can I get the last seq number used? 

Where  the sequence number is being set ? 

Why a zero is sent  here? : 

 public virtual bool Send(Message message)
        {
            message.Header.RemoveField(Fields.Tags.PossDupFlag);
            message.Header.RemoveField(Fields.Tags.OrigSendingTime);
            return SendRaw(message, 0); 
        }

I guess the sequence number is taken from here, so should I add that to 
the message's header? 

 protected void Persist(Message message, string messageString)
        {
            if (this.PersistMessages)
            {
                int msgSeqNum = message.Header.GetInt(Fields.Tags
.MsgSeqNum);
                state_.Set(msgSeqNum, messageString);
            }
            state_.IncrNextSenderMsgSeqNum();
        }



Thanks & regards! 




********************************************************************************************************
This email is sent to you by Infosys Limited on behalf of Deutsche Bank.
Diese email wurde Ihnen von Infosys Limited im Auftrag der Deutschen Bank 
gesendet
********************************************************************************************************* 




From:
Grant Birchmeier <gbirchmeier at connamara.com>
To:
"Mailing list for QuickFIX/n" <quickfixn at lists.quickfixn.com>, 
Date:
11/25/2013 05:13 PM
Subject:
Re: {{Quickfixn}} Log In troubles [I]



1) The message "An Existing connection was forcibly closed by the remote 
host " means that the other side is terminating the connection.  You may 
not know why.

2) "MsgSeqNum=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. 

3) Asking the other side to reset their sequence numbers is not a great 
idea.  They'll probably refuse. 

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


_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com




---
This communication may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this communication
in error) please notify the sender immediately and destroy this
communication. Any unauthorized copying, disclosure or distribution of the
material in this communication is strictly forbidden.

Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20131125/f6846470/attachment-0002.htm>


More information about the Quickfixn mailing list