{{Quickfixn}} QuickFix.MessageParseError - FIX 4.4

Grant Birchmeier gbirchmeier at connamara.com
Fri May 6 07:09:34 PDT 2016


What is ABFixMessage?
​

​
What is outgoingMessageBufferBlock?
​

What is OnOutgoing and what's calling it?​

​The code you've posted is either very specific to your application... or
simply misguided​.  Without knowing more about your app, I honestly can't
tell which.

Am I reading it right that the app is choking on a FIXT.1.1 message?
That's a FIX5 header.  If you are running a FIX44 app, it should definitely
choke on a FIXT message, because that's not allowed in FIX44.


On Fri, May 6, 2016 at 3:20 AM, Rao, Masthan <Masthan.Rao at abglobal.com>
wrote:

> Hi,
>
>             I am getting the following error in “OnOutgoing” and
> “OnIncoming” methods while parsing FIX messages. The same code is working
> FIX 5.0 specification but when I am using the same code for FIX 4.4 for
> another client its throwing the following error. While debugging when I hit
> the OnOutGoing method first time the method session.GetMessage is
> succesffuly parsing the message
> “8=FIX.4.49=10135=034=249=ABMKTDATAUAT52=20160506-07:55:49.41856=xxxxxxx553=xxxxxxx554=wu7fy3kih9iL10=131”.
>
>
> Immediately  again I am hitting OnOutgoing message and this time I am
> getting message "OUT: \n
> 8\t(BeginString)=\t\tFIXT.1.1|\r\n9\t(BodyLength)=\t\t126|\r\n35\t(MsgType)=\t\tA|\r\n34\t(MsgSeqNum)=\t\t1|\r\n49\t(SenderCompID)=\t\xxxxx|\r\n52\t(SendingTime)=\t\t20160506-05:23:45.993|\r\n56\t(TargetCompID)=\t\xxxxxx|\r\n553\t(Username)=\t\xxxxxxxx|\r\n554\t(Password)=\t\xxxxxxxx|\r\n98\t(EncryptMethod)=\t\t0|\r\n108\t(HeartBtInt)=\t\t30|\r\n141\t(ResetSeqNumFlag)=\t\tY|\r\n1137\t(DefaultApplVerID)=\t\t9|\r\n10\t(CheckSum)=\t\t110|\r\n
> -(UNKNOWN Tag)=|\r\n"
>
>
>
> Which the FIX engine is failing to parse and throwing error. Not sure
> where I am going wrong. Can you guys please help?
>
>
>
> Sample code
>
>         public void OnOutgoing(string msg)
>
>         {
>
>             try
>
>             {
>
>                 Session session = Session.LookupSession(ActiveSessionID);
>
>                 ABFixMessage message = new ABFixMessage() { Message = session.GetMessage(msg)
> };
>
>                 Log(message.Message, msg, "OutGoing");
>
>
>
>                 if (outgoingMessageBufferBlock != null && !msg.StartsWith(
> "OUT:") && ActiveSessionID != null)
>
>                 {
>
>                     if (message.Message.Header.IsSetField(56) &&
> message.Message.Header.IsSetField(49))
>
>                         message.Source = isAcceptor ?
> message.Message.Header.GetField(56) : message.Message.Header.GetField(49);
>
>                     outgoingMessageBufferBlock.Post(message);
>
>                 }
>
>             }
>
>             catch(Exception ex)
>
>             {
>
>                 logger.Error("OnOutgoing", ex);
>
>             }
>
>         }
>
>
>
>
>
> Errors
>
>
>
> 03:55:50,620 [11] DEBUG Fix - [OutGoing]
> 8=FIX.4.49=10135=034=249=ABMKTDATAUAT52=20160506-07:55:49.41856=xxxxxxx553=xxxxxxx554=wu7fy3kih9iL10=131
>
> 03:55:52,461 [11] ERROR Fix - OnOutgoing
>
> QuickFix.MessageParseError: Could not parse message: missing or malformed
> tag 35 in msg: OUT:
>
>
>
>    at QuickFix.Message.GetMsgType(String fixstring)
>
>    at QuickFix.Message.IdentifyType(String fixstring)
>
>    at QuickFix.Session.GetMessage(String msgStr)
>
>    at AB.FixEngine.ABFixLogger.OnOutgoing(String msg) in
> c:\work\crab\branch\2016.1.0\AB.FixEngine\AB.FixEngine\ABFixLogger.cs:line
> 65
>
> 03:55:53,740 [11] ERROR Fix - OnIncoming
>
> QuickFix.MessageParseError: Could not parse message: Error at position (0)
> while parsing msg ( session.Next :
> 8=FIX.4.49=13335=334=249=xxxxxx52=20160506-07:55:52.89856=xxxxxxx45=258=Tag
> not defined for this message type371=553372=0373=210=187) --->
> System.FormatException: Input string was not in a correct format.
>
>    at System.Number.StringToNumber(String str, NumberStyles options,
> NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
>
>    at System.Number.ParseInt32(String s, NumberStyles style,
> NumberFormatInfo info)
>
>    at QuickFix.Message.ExtractField(String msgstr, Int32& pos,
> DataDictionary sessionDD, DataDictionary appDD)
>
>    --- End of inner exception stack trace ---
>
>    at QuickFix.Message.ExtractField(String msgstr, Int32& pos,
> DataDictionary sessionDD, DataDictionary appDD)
>
>    at QuickFix.Message.ExtractBeginString(String msgstr)
>
>    at QuickFix.Session.GetMessage(String msgStr)
>
>    at AB.FixEngine.ABFixLogger.OnIncoming(String msg) in
> c:\work\crab\branch\2016.1.0\AB.FixEngine\AB.FixEngine\ABFixLogger.cs:line
> 45
>
> 03:55:54,925 [11] ERROR Fix - OnIncoming
>
> QuickFix.MessageParseError: Could not parse message: missing or malformed
> tag 35 in msg: IN:
>
>  8         (BeginString)=               FIX.4.4|
>
> 9          (BodyLength)=              133|
>
> 35         (MsgType)=                  3|
>
> 34         (MsgSeqNum)=             2|
>
> 49         (SenderCompID)=                     xxxxxxxxx|
>
> 52         (SendingTime)=             20160506-07:55:52.898|
>
> 56         (TargetCompID)=                       xxxxxxx|
>
> 45         (RefSeqNum)=              2|
>
> 58         (Text)=              Tag not defined for this message type|
>
> 371       (RefTagID)=                  553|
>
> 372       (RefMsgType)=             0|
>
> 373       (SessionRejectReason)=                        2|
>
> 10         (CheckSum)=                187|
>
> -(UNKNOWN Tag)=|
>
>
>
>    at QuickFix.Message.GetMsgType(String fixstring)
>
>    at QuickFix.Message.IdentifyType(String fixstring)
>
>    at QuickFix.Session.GetMessage(String msgStr)
>
>    at AB.FixEngine.ABFixLogger.OnIncoming(String msg) in
> c:\work\crab\branch\2016.1.0\AB.FixEngine\AB.FixEngine\ABFixLogger.cs:line
> 45
>
>
> ............................................................................
>
> For further important information about AllianceBernstein please click here
> http://www.abglobal.com/disclaimer/email/disclaimer.html
>
> _______________________________________________
> 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/20160506/19156c19/attachment-0002.htm>


More information about the Quickfixn mailing list