{{Quickfixn}} How to catch transport-layer exception

陈荣澍 chenrongshu at yxinvestment.com
Tue Nov 24 22:32:17 PST 2015


Thanks for the reply. 
I downloaded the latest one from github and built. But got the same error.
I can see from the fix logs that I received the disordered code like below. 
58=error_business: Broker return: Code:12 Msg:ί������[10]�ǻ�����λ[100]��������! 
Confirmed with my counterparty, they were sending valid Chinese characters in the message. It looks like the engine could not parse the characters. I found in the Parser.cs ExtractLength method already takes UTF-8 into account. Is there anything missing?
public bool ExtractLength(out int length, out int pos, string buf)
{
   return ExtractLength(out length, out pos, System.Text.Encoding.UTF8.GetBytes(buf));
}

From: Grant Birchmeier
Date: 2015-11-24 23:34
To: Mailing list for QuickFIX/n
Subject: Re: {{Quickfixn}} How to catch transport-layer exception
​Per the FIX standard, non-ASCII characters are not supposed to be sent in FIX messages outside of "EncodedXXX" fields.

In reality, many counterparties do it anyway.

​Some time ago I put in a fix that (so I thought) would allow UTF-8 characters to be accepted.  I can't remember which release that went into, or if it's only in the repo right now.

Can you try downloading the latest engine source and building and see if you see an improvement?

On Tue, Nov 24, 2015 at 2:02 AM, 陈荣澍 <chenrongshu at yxinvestment.com> wrote:
I guess I need to deal with the QF source codes directly. Can someone shed light on this please ?
 
From: 陈荣澍
Date: 2015-11-23 08:33
To: quickfixn
Subject: Re: Re: {{Quickfixn}} How to catch transport-layer exception
Hi Grant,

Yes, is there a way to support non english characters?

Thanks.
From: Grant Birchmeier
Date: 2015-11-20 23:56
To: Mailing list for QuickFIX/n
Subject: Re: {{Quickfixn}} How to catch transport-layer exception
Is this error being caused by messages that contain Chinese characters?

On Fri, Nov 20, 2015 at 1:16 AM, 陈荣澍 <chenrongshu at yxinvestment.com> wrote:
Everytime there is a transport-layer exception, QF will kick out the current session and re-init a logon request like below. Is there a way to catch this kind of exception to avoid re-initializing the current session?

20151120-07:00:38.656 : Connection succeeded
20151120-07:00:38.675 : Session reset: ResetOnLogon
20151120-07:00:38.696 : Session reset: ResetSeqNumFlag
20151120-07:00:38.698 : Initiated logon request
20151120-07:00:38.970 : Sequence numbers reset due to ResetSeqNumFlag=Y
20151120-07:00:40.899 : Received logon
20151120-07:00:48.843 : Invalid message: Expected BodyLength=295, Received BodyLength=255
20151120-07:00:48.868 : Session FIX.4.2:client->Q_SERVER disconnecting: QuickFix.InvalidMessage: Invalid message: Expected BodyLength=295, Received BodyLength=255
   在 QuickFix.Session.Next(MessageBuilder msgBuilder)
   在 QuickFix.Session.NextMessage(String msgStr)
   在 QuickFix.Session.Next(String msgStr)
   在 QuickFix.SocketInitiatorThread.ProcessStream()
   在 QuickFix.SocketInitiatorThread.Read()
20151120-07:00:48.903 : Connecting to 10.253.251.93 on port 3383
20151120-07:00:48.909 : Connection succeeded
20151120-07:00:48.921 : Session reset: ResetOnLogon
20151120-07:00:48.929 : Session reset: ResetSeqNumFlag
20151120-07:00:48.930 : Initiated logon request
20151120-07:00:49.400 : Sequence numbers reset due to ResetSeqNumFlag=Y

Justin Chen
Thanks

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




-- 
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.
http://connamara.com

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




-- 
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.
http://connamara.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20151125/38d15b47/attachment-0001.htm>


More information about the Quickfixn mailing list