<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE-CH link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>i personally had bad experience with TPL regarding speed. I use instead “</span><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white'>ConcurrentQueue</span><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'>“ which is also thread safe together with async methods „var t = Task.Run<T>(async () => {})”. My app performece pretty good – something out of fix, writing log entry, each in 0.3ms beside the QF/n o the same host.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'>Walter.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> quickfixn-bounces@lists.quickfixn.com [mailto:quickfixn-bounces@lists.quickfixn.com] <b>On Behalf Of </b>Phillip Wei<br><b>Sent:</b> Montag, 4. November 2013 20:43<br><b>To:</b> Mailing list for QuickFIX/n<br><b>Subject:</b> Re: {{Quickfixn}} Crack Message from String<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Mike’s answer seems right.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I would consider using the TPL Dataflow package (if you can) instead of an explicit MessageQueue to consume the messages on a seperate task (<a href="http://msdn.microsoft.com/en-us/library/hh228601(v=vs.110).aspx)">http://msdn.microsoft.com/en-us/library/hh228601(v=vs.110).aspx)</a>. This seems like it would be easier (and maybe more performant).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Phil<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:quickfixn-bounces@lists.quickfixn.com">quickfixn-bounces@lists.quickfixn.com</a> [<a href="mailto:quickfixn-bounces@lists.quickfixn.com">mailto:quickfixn-bounces@lists.quickfixn.com</a>] <b>On Behalf Of </b>Mike Gatny<br><b>Sent:</b> Monday, November 04, 2013 2:28 PM<br><b>To:</b> Mailing list for QuickFIX/n<br><b>Subject:</b> Re: {{Quickfixn}} Crack Message from String<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p><span lang=EN-US>The usual way to do this is to have your OnMessage callbacks do nothing but put a copy of the msg onto a queue for later processing. I.e. similar to what you are doing, but you let QF do the parsing for you before you do the queueing. That should be doable at way faster than 60/sec. Not sure if anyone has any QF/n perf numbers lying around... <o:p></o:p></span></p><p><span lang=EN-US>Anyway, in general you want to return from the QF callbacks asap, otherwise you are blocking its processing thread.<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US>On Nov 4, 2013 1:10 PM, "Gaull, James" <<a href="mailto:JGaull@ftportfolios.com">JGaull@ftportfolios.com</a>> wrote:<o:p></o:p></span></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you very much for your reply. I will look into getting this to work with a FIX42.Message.</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If it’s not out of scope for this forum, I’d like to explain my thought process behind using the message queue. I need to be able to receive about 1000 messages per second through my C# application from the FIX hub we’re using but I don’t have a requirement to process all of these messages that quickly. I started out by writing code to process the execution report messages in the FromApp function but found that I was only able to process about 60 messages per second which was unacceptable since it will slow down the FIX hub. My thought was that if my FromAdmin function just writes the FIX messages to a queue, I could then have another process pop these FIX messages off the queue and I could process them without slowing down the FIX hub.</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Maybe I’m overthinking this. I’d really be interested in hearing how others are delegating the processing of the messages so they’re not slowing down the receiving of messages. But I understand this may be out of scope for this forum.</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:quickfixn-bounces@lists.quickfixn.com" target="_blank">quickfixn-bounces@lists.quickfixn.com</a> [mailto:<a href="mailto:quickfixn-bounces@lists.quickfixn.com" target="_blank">quickfixn-bounces@lists.quickfixn.com</a>] <b>On Behalf Of </b>Mike Gatny<br><b>Sent:</b> Monday, November 04, 2013 10:53 AM<br><b>To:</b> Mailing list for QuickFIX/n<br><b>Subject:</b> Re: {{Quickfixn}} Crack Message from String</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> <o:p></o:p></span></p><p><span lang=EN-US>The cracker delegates to OnMessage using the (C#) Type of the Message. So you need to create a FIX42.Message instead of a Message in order for your call to crack() to work. See line 505 of Session.cs in the master branch to see how QF itself does this.<o:p></o:p></span></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US><br>_______________________________________________<br>Quickfixn mailing list<br><a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br><a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><o:p></o:p></span></p></div></div></body></html>