{{Quickfixn}} reading feed to system.console

Walter Robert Ditzler ditwal001 at gmail.com
Thu Mar 7 09:25:22 PST 2013


I will,

soryy guys, i thought quickfixn already checks for the presence.

Thanks walter.

-----Original Message-----
From: quickfixn-bounces at lists.quickfixn.com
[mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Grant Birchmeier
Sent: Donnerstag, 7. März 2013 17:43
To: Mailing list for QuickFIX/n
Subject: Re: {{Quickfixn}} reading feed to system.console

You're trying to read 270 from every single message, even messages that
don't have it.  When a message doesn't have it, it throws an exception.
Looks like that's what's happening.

Check for the presence of 270 before you try to read it.



On Thu, Mar 7, 2013 at 6:26 AM, Walter Robert Ditzler <ditwal001 at gmail.com>
wrote:
> Hi again,
>
> question: is quickfix/n thread safe? When I try, for testing, to read 
> incoming data from field 270 I always get error and system logs out. 
> When I uncomment it in FromApp loging runs and I can see feed coming 
> in (on firewall with tcpdump).
>
> Any idea?
>
> Thanks a lot walter.
>
>
> Error in visual studio
> ***
> A first chance exception of type
> 'System.Collections.Generic.KeyNotFoundException' occurred in 
> System.dll A first chance exception of type 
> 'QuickFix.FieldNotFoundException' occurred in QuickFix.dll A first 
> chance exception of type 
> 'System.Collections.Generic.KeyNotFoundException' occurred in 
> System.dll A first chance exception of type 
> 'QuickFix.FieldNotFoundException' occurred in QuickFix.dll A first 
> chance exception of type 'System.Net.Sockets.SocketException'
> occurred in System.dll
> The thread '<No Name>' (0xfa8) has exited with code 0 (0x0).
> ***
>
> My application class
> ***
> public class Application : MessageCracker, IApplication
>     {
>         public void FromApp(Message msg, SessionID sessionID)
>         {
>             Console.WriteLine(msg.GetDecimal(270).ToString());
>         }
>
>         public void OnCreate(SessionID sessionID) { }
>         public void OnLogout(SessionID sessionID) { }
>         public void OnLogon(SessionID sessionID) { }
>         public void FromAdmin(Message msg, SessionID sessionID) { }
>
>         public void ToAdmin(Message msg, SessionID sessionID)
>         {
>             QuickFix.Fields.Username _Username = new 
> QuickFix.Fields.Username("username");
>             QuickFix.Fields.Password _Password = new 
> QuickFix.Fields.Password("password");
>             msg.SetField(_Username);
>             msg.SetField(_Password);
>         }
>
>         public void ToApp(Message msg, SessionID sessionID) { }
>     }
> ***
>
> _______________________________________________
> 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




More information about the Quickfixn mailing list