quickfix-developers Mailing List for QuickFIX (Page 77)
Brought to you by:
orenmnero
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
|
Feb
(5) |
Mar
(16) |
Apr
(15) |
May
(17) |
Jun
(33) |
Jul
(35) |
Aug
(34) |
Sep
(19) |
Oct
(40) |
Nov
(51) |
Dec
(43) |
2003 |
Jan
(45) |
Feb
(79) |
Mar
(124) |
Apr
(121) |
May
(132) |
Jun
(77) |
Jul
(110) |
Aug
(57) |
Sep
(48) |
Oct
(83) |
Nov
(60) |
Dec
(40) |
2004 |
Jan
(67) |
Feb
(72) |
Mar
(74) |
Apr
(87) |
May
(70) |
Jun
(96) |
Jul
(75) |
Aug
(147) |
Sep
(128) |
Oct
(83) |
Nov
(67) |
Dec
(42) |
2005 |
Jan
(110) |
Feb
(84) |
Mar
(68) |
Apr
(55) |
May
(51) |
Jun
(192) |
Jul
(111) |
Aug
(100) |
Sep
(79) |
Oct
(127) |
Nov
(73) |
Dec
(112) |
2006 |
Jan
(95) |
Feb
(120) |
Mar
(138) |
Apr
(127) |
May
(124) |
Jun
(97) |
Jul
(103) |
Aug
(88) |
Sep
(138) |
Oct
(91) |
Nov
(112) |
Dec
(57) |
2007 |
Jan
(55) |
Feb
(35) |
Mar
(56) |
Apr
(16) |
May
(20) |
Jun
(77) |
Jul
(43) |
Aug
(47) |
Sep
(29) |
Oct
(54) |
Nov
(39) |
Dec
(40) |
2008 |
Jan
(69) |
Feb
(79) |
Mar
(122) |
Apr
(106) |
May
(114) |
Jun
(76) |
Jul
(83) |
Aug
(71) |
Sep
(53) |
Oct
(75) |
Nov
(54) |
Dec
(43) |
2009 |
Jan
(32) |
Feb
(31) |
Mar
(64) |
Apr
(48) |
May
(38) |
Jun
(43) |
Jul
(35) |
Aug
(15) |
Sep
(52) |
Oct
(62) |
Nov
(62) |
Dec
(21) |
2010 |
Jan
(44) |
Feb
(10) |
Mar
(47) |
Apr
(22) |
May
(5) |
Jun
(54) |
Jul
(19) |
Aug
(54) |
Sep
(16) |
Oct
(15) |
Nov
(7) |
Dec
(8) |
2011 |
Jan
(18) |
Feb
(9) |
Mar
(5) |
Apr
(5) |
May
(41) |
Jun
(40) |
Jul
(29) |
Aug
(17) |
Sep
(12) |
Oct
(23) |
Nov
(22) |
Dec
(11) |
2012 |
Jan
(8) |
Feb
(24) |
Mar
(5) |
Apr
(5) |
May
(6) |
Jun
(5) |
Jul
(5) |
Aug
(5) |
Sep
(2) |
Oct
(9) |
Nov
(2) |
Dec
(18) |
2013 |
Jan
(25) |
Feb
(16) |
Mar
(8) |
Apr
(2) |
May
(16) |
Jun
(17) |
Jul
(2) |
Aug
(13) |
Sep
(3) |
Oct
(4) |
Nov
(1) |
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
(22) |
Apr
(9) |
May
(3) |
Jun
(1) |
Jul
(5) |
Aug
(11) |
Sep
(18) |
Oct
(4) |
Nov
(4) |
Dec
(3) |
2015 |
Jan
(2) |
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
(37) |
Jul
|
Aug
(4) |
Sep
(6) |
Oct
(1) |
Nov
(4) |
Dec
(2) |
2016 |
Jan
(9) |
Feb
(3) |
Mar
(7) |
Apr
(1) |
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
(7) |
Oct
(3) |
Nov
(16) |
Dec
|
2017 |
Jan
(1) |
Feb
(15) |
Mar
(2) |
Apr
(12) |
May
(4) |
Jun
(7) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
(23) |
Dec
(8) |
2018 |
Jan
(2) |
Feb
(4) |
Mar
(2) |
Apr
(8) |
May
(3) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(5) |
Nov
(3) |
Dec
|
2020 |
Jan
|
Feb
(4) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(12) |
Aug
(5) |
Sep
(3) |
Oct
(1) |
Nov
|
Dec
(1) |
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Karl S. <ka...@gm...> - 2008-07-07 13:26:04
|
I am trying to use the store attached to a particular session in order to request historical messages by the sequence number. I am running the C# wrapper to quickfix and am requesting the previous message with the following code: int seqNum = (int)lvFixMessages.SelectedItems[0].Tag; ArrayList msgList = new ArrayList(); FixApplication.Session.getStore().get(seqNum, seqNum, msgList); if(msgList.Count > 0) { QuickFix.Message msg = new Message((string)msgList[0]); } I may be running into a multi-threaded issue here, as this is called from the user interface thread, but I was hoping that read operations were threadsafe. The problem is characterisitic of multi-threading issues, sometimes it works just fine. Other times I get an AccessViolationException "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Or sometimes I also get "Runtime Error! R6025 - pure virtual function call" Please let me know if there is a threadsafe way to access the filestore. I am using a filestore and a single initiator, with a standard Application. Thanks, -Karl |
From: Shane T. <str...@co...> - 2008-07-07 13:06:18
|
Linus, That depends on how you are constructing the message. Can you paste the code where you create the order message? -- Shane Trotter Connamara Systems, LLC On Mon, Jul 7, 2008 at 5:13 AM, Linus <lyn...@ya...> wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hi > > when i try to send an order messge i get a reject message whith "invalid > message > type" error. wat could be the problem. > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: <ily...@bn...> - 2008-07-07 12:06:15
|
Je serai absent(e) à partir du 07/03/2008 de retour le 07/15/2008. Je répondrai à votre message dès mon retour. I'll be out of office till July 15th. I'll reply to your email as soon as I get back. In the meantime, should you have any request, you can contact Damien Delvallée (dam...@bn...) or FIB...@bn.... This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. Do not print this message unless it is necessary, consider the environment. --------------------------------------------- Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. N'imprimez ce message que si necessaire, pensez a l'environnement. |
From: Linus <lyn...@Ya...> - 2008-07-07 12:05:09
|
Hi when i try to send an order messge i get a reject message whith "invalid message type" error. wat could be the problem. |
From: Alex G. <ale...@bl...> - 2008-07-07 11:26:26
|
Hello all, Just started playing with QF, so far it's a lovely bit of code, thanks for all the hard work! Few apparently ruby-specific questions: 1: I can't seem to log sessions out, calling Quickfix::Session.logout gives "undefined method `logout' for Quickfix::Session:Class" despite the fact I can see it in the SWIG file. 2: Calling initiator.stop doesn't seem to generate logout messages but my understanding of the logout method is that it should (unless for some reason those messages doesn't pass through screenlog). It does however seem to issue a heartbeat (?!) before closing: > Issuing stop > <20080707-11:15:24, FIX.4.2:EXAMP->TESTER, outgoing> > (8=FIX. 4.29=5535=034=1649=EXAMP52=20080707-11:15:24.35056=TESTER10=080) 3: I'm having a little trouble getting hold of session object directly. From searching around the docs and this list I tried both getSession and lookupSession but I don't understand what's needed in a ruby environment for the responder argument for getSession and lookupSession returned "No matching function for overloaded 'Session_lookupSession' (ArgumentError)". Using Ruby 1.8.7 on OSX10.5.4 and (after trying 1844 and reading the checkin notes) Quickfix 1854. Looking forward to really digging into quickfix, Alex |
From: <or...@qu...> - 2008-07-07 02:49:57
|
Connection reset by peer is a pretty clear indication that they are disconnecting you. It's not even a QuickFIX error message, it's a socket error message being propagated by the operating system. Somewhere along the line they are closing the socket. I would have them dig deeper into what is going on. --oren > -------- Original Message -------- > Subject: [Quickfix-users] editing QF > From: "Julián_Mendiola" <jul...@pr...> > Date: Thu, July 03, 2008 3:05 pm > To: "or...@qu..." <or...@qu...>,quickfix-users > <qui...@li...>,qui...@li... > > > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html<hr>I need to use FIXML with a Server. The solution that came up was to edit > some QuickFIx code to allow this functionality, the idea is to catch every > incoming FIXML message and translate it to FIX, and edit every sending > message to FIXML before the sending. > I started with the logOn message, in the moment the string is sent to the > socket I catch it and parse it to xml, as it just a string the socket > mustn't have any problem. But the following happens: > > 20080703-16:02:22 : Connecting to 64.94.169.123 on port 443 > 20080703-16:02:22 : Initiated logon request > 20080703-16:02:23 : Socket Error: Connection reset by peer. > 20080703-16:02:23 : Disconnecting > > The Log In message I'm sending is(cached from the LogFile): > > <FIXML v="4.4" s="20040109" r="20030618"><UserReq UserReqID="1" > UserReqTyp="1" Username="username" Password="password"/></FIXML> > > I contact the other conunterparty for this error and they response: > > >Our network team doesn't see anything unusual. They ran a study of you IP > for the last 6 hours > >We see you connect and disconnect that's it. > > >The NYMEX target 64.94.169.123 on port 443 is open to all so it is not > firewall here. > >I tested your logon from here, and it was successful, so the application is > not disconnecting you. > >We do not have any system issues here there are users currently connected. > > >I do not know why your connection is being broken. > > >Are you behind Firewalls, proxies? > >Perhaps your app is causing this? > > Do you have any idea of what might be going on here??<hr>------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08<hr>_______________________________________________ > Quickfix-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-users |
From: J. M. <jul...@pr...> - 2008-07-03 20:05:32
|
I need to use FIXML with a Server. The solution that came up was to edit some QuickFIx code to allow this functionality, the idea is to catch every incoming FIXML message and translate it to FIX, and edit every sending message to FIXML before the sending. I started with the logOn message, in the moment the string is sent to the socket I catch it and parse it to xml, as it just a string the socket mustn't have any problem. But the following happens: 20080703-16:02:22 : Connecting to 64.94.169.123 on port 443 20080703-16:02:22 : Initiated logon request 20080703-16:02:23 : Socket Error: Connection reset by peer. 20080703-16:02:23 : Disconnecting The Log In message I'm sending is(cached from the LogFile): <FIXML v="4.4" s="20040109" r="20030618"><UserReq UserReqID="1" UserReqTyp="1" Username="username" Password="password"/></FIXML> I contact the other conunterparty for this error and they response: >Our network team doesn't see anything unusual. They ran a study of you IP for the last 6 hours >We see you connect and disconnect that's it. >The NYMEX target 64.94.169.123 on port 443 is open to all so it is not firewall here. >I tested your logon from here, and it was successful, so the application is not disconnecting you. >We do not have any system issues here there are users currently connected. >I do not know why your connection is being broken. >Are you behind Firewalls, proxies? >Perhaps your app is causing this? Do you have any idea of what might be going on here?? |
From: Jonathan A. <ja...@aa...> - 2008-07-01 17:10:13
|
So just to be clear, if I get a TCP packet containing "2gh3094 782h-923nd-98fnd23-98n 24-97c", that will get logged somewhere? Jonathan Louis Allen D: 858.547.7731 ________________________________ From: Shane Trotter [mailto:str...@co...] Sent: Tuesday, July 01, 2008 9:29 AM To: Jonathan Allen Cc: qui...@li... Subject: Re: [Quickfix-developers] Bad Message Detection Jonathan, It should attempt to validate it and log to the event.log during failure. -- Shane Trotter Connamara Systems, LLC On Tue, Jul 1, 2008 at 11:13 AM, Jonathan Allen <ja...@aa...> wrote: QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html If my partner company sends a garbled message will QuickFix log that in any way or just silently ignore it? Jonathan Louis Allen Software Developer D: 858.547.7731 C: 619.933.8527 Advisors Asset Management 7220 Trade Street Suite 310 San Diego, CA 92121 www.aam.us.com Advisors Asset Management, Inc. (AAM) is a FINRA/ SIPC member and SEC Registered Investment Advisor. INFORMATION REGARDING SECURITIES IS FOR BROKER/DEALER AND REGISTERED ADVISOR USE ONLY - NOT FOR USE WITH THE PUBLIC If the reader of this message is not the intended recipient, you are notified that any disclosure, distribution or copying is prohibited. Please see http://www.aam.us.com/FISBonds/PublicSite/EmailDisclosures.aspx for additional disclosures. ------------------------------------------------------------------------ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers Advisors Asset Management, Inc. (AAM) is a FINRA/ SIPC member and SEC Registered Investment Advisor. INFORMATION REGARDING SECURITIES IS FOR BROKER/DEALER AND REGISTERED ADVISOR USE ONLY - NOT FOR USE WITH THE PUBLIC If the reader of this message is not the intended recipient, you are notified that any disclosure, distribution or copying is prohibited. Please see http://www.aam.us.com/FISBonds/PublicSite/EmailDisclosures.aspx for additional disclosures. |
From: <or...@qu...> - 2008-07-01 16:29:03
|
It will get logged. It should also give you some information about why the message is bad. --oren > -------- Original Message -------- > Subject: [Quickfix-developers] Bad Message Detection > From: Jonathan Allen <ja...@aa...> > Date: Tue, July 01, 2008 11:13 am > To: "qui...@li..." > <qui...@li...> > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html<hr>If my partner company sends a garbled message will QuickFix log that in > any way or just silently ignore it? > > Jonathan Louis Allen > Software Developer > D: 858.547.7731 > C: 619.933.8527 > Advisors Asset Management > 7220 Trade Street > Suite 310 > San Diego, CA 92121 > www.aam.us.com > > Advisors Asset Management, Inc. (AAM) is a FINRA/ SIPC member and SEC Registered Investment Advisor. > INFORMATION REGARDING SECURITIES IS FOR BROKER/DEALER AND REGISTERED ADVISOR USE ONLY - NOT FOR USE WITH THE PUBLIC If the reader of this message is not the intended recipient, you are notified that any disclosure, distribution or copying is prohibited. Please see http://www.aam.us.com/FISBonds/PublicSite/EmailDisclosures.aspx for additional disclosures.<hr>------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php<hr>_______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
From: Shane T. <str...@co...> - 2008-07-01 16:29:00
|
Jonathan, It should attempt to validate it and log to the event.log during failure. -- Shane Trotter Connamara Systems, LLC On Tue, Jul 1, 2008 at 11:13 AM, Jonathan Allen <ja...@aa...> wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > If my partner company sends a garbled message will QuickFix log that in > any way or just silently ignore it? > > > > *Jonathan Louis Allen* > Software Developer > D: 858.547.7731 > C: 619.933.8527 > > > > Advisors Asset Management > 7220 Trade Street > Suite 310 > San Diego, CA 92121 > www.aam.us.com > > > Advisors Asset Management, Inc. (AAM) is a FINRA/ SIPC member and SEC > Registered Investment Advisor. > INFORMATION REGARDING SECURITIES IS FOR BROKER/DEALER AND REGISTERED > ADVISOR USE ONLY - NOT FOR USE WITH THE PUBLIC If the reader of this message > is not the intended recipient, you are notified that any disclosure, > distribution or copying is prohibited. Please see > http://www.aam.us.com/FISBonds/PublicSite/EmailDisclosures.aspx for > additional disclosures. > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: Jonathan A. <ja...@aa...> - 2008-07-01 16:14:12
|
If my partner company sends a garbled message will QuickFix log that in any way or just silently ignore it? Jonathan Louis Allen Software Developer D: 858.547.7731 C: 619.933.8527 Advisors Asset Management 7220 Trade Street Suite 310 San Diego, CA 92121 www.aam.us.com Advisors Asset Management, Inc. (AAM) is a FINRA/ SIPC member and SEC Registered Investment Advisor. INFORMATION REGARDING SECURITIES IS FOR BROKER/DEALER AND REGISTERED ADVISOR USE ONLY - NOT FOR USE WITH THE PUBLIC If the reader of this message is not the intended recipient, you are notified that any disclosure, distribution or copying is prohibited. Please see http://www.aam.us.com/FISBonds/PublicSite/EmailDisclosures.aspx for additional disclosures. |
From: <or...@qu...> - 2008-07-01 15:23:47
|
MsgType is a header field, but you are adding it to the main message body, so QuickFIX cannot locate it. If you add it to the header you should be fine. --oren > -------- Original Message -------- > Subject: [Quickfix-developers] sendToTarget and "SessionNotFound" > woes... > From: Alex Marangos <ale...@ya...> > Date: Tue, July 01, 2008 7:10 am > To: qui...@li... > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html<hr>Hi all, > > I'm writing a simple QuickFix application (just evaluating it for now) in C#, and I'm having problems getting sendToTarget to work.... Sorry for the length of this email, but I'm completely baffled by what does and doesn't work... > > So far, I've created a ThreadedSocketInitiator with the following config: > > [DEFAULT] > ConnectionType=acceptor > SocketAcceptPort=40000 > ReconnectInterval=60 > FileStorePath=Logs\QuickFIX.Acceptor > FileLogPath=Logs\QuickFIX.Acceptor > PersistMessages=Y > > [SESSION] > BeginString=FIX.4.0 > SenderCompID=ACCEPTOR40 > TargetCompID=INITIATOR40 > StartTime=00:00:00 > EndTime=23:59:59 > HeartBtInt=5 > UseDataDictionary=Y > DataDictionary=FIX40.xml > ValidateFieldsHaveValues=Y > ValidateFieldsOutOfOrder=N > > On the receiving end I have an instance of the executor running, with the appropriate session configuration. I can start both applications and the sessions connect and heartbeat. > > Now I'm confused as to what's needed when creating a FIX message and using sendToTarget() in my application, as in some cases it works, in others it doesn't. The code to create and send the message looks like: > > 01: stringbeginString = "FIX.4.0"; > 02: stringsenderCompID = "INITIATOR40"; > 03: stringtargetCompID = "ACCEPTOR40"; > 04: QuickFix.Messagefixmsg = newQuickFix.Message(); > 05: QuickFix.BeginStringbgn = newBeginString(beginString); > 06: QuickFix.SenderCompIDscid = newSenderCompID(senderCompID); > 07: QuickFix.TargetCompIDtcid = newTargetCompID(targetCompID); > 08: QuickFix.MsgTypemsgType = newQuickFix.MsgType(QuickFix.MsgType.ORDER_SINGLE); > 09: QuickFix.OrdTypeordType = newQuickFix.OrdType(QuickFix.OrdType.MARKET); > 10: intrnd = newSystem.Random().Next(); > 11: QuickFix.ClOrdIDclOrdID = newQuickFix.ClOrdID(rnd.ToString()); > 12: QuickFix.HandlInsthandlInst = newQuickFix.HandlInst(QuickFix.HandlInst.AUTOMATED_EXECUTION_ORDER_PUBLIC); > 13: QuickFix..OrderQtyorderQty = newQuickFix.OrderQty(1000); > 14: QuickFix.Symbolsymbol = newQuickFix.Symbol("IBM"); > 15: QuickFix.Sideside = newQuickFix.Side(QuickFix.Side.BUY); > 16: fixmsg.getHeader().setField(bgn); > 17: fixmsg.getHeader().setField(scid); > 18: fixmsg.getHeader().setField(tcid); > 19: fixmsg.setField(ordType); > 20: fixmsg.setField(msgType); > 21: fixmsg.setField(clOrdID); > 22: fixmsg.setField(handlInst); > 23: fixmsg.setField(symbol); > 24: fixmsg.setField(side); > 25: fixmsg.setField(orderQty); > 26: fixmsg.setField(ordType); > 27: Console.WriteLine("Message to send: {0}", fixmsg.ToString()); > 28: Console.WriteLine("BeginString: {0}", beginString); > 29: Console.WriteLine("SenderCompID: {0}", senderCompID); > 30: Console.WriteLine("TargetCompID: {0}", targetCompID); > 31: SessionIDsID = newSessionID(beginString, senderCompID, targetCompID); > 32: Console.WriteLine("Session Exists: {0}", Session.doesSessionExist(sID)); > 33: Session.sendToTarget(fixmsg, senderCompID, targetCompID); > > This throws a "SessionNotFound" error. Session.doesSessionExist(sID) returns "True", however... > > And if I replace sendToTarget() with: > Session.sendToTarget(fixmsg, sID); > > I get an exception as follows: > System.Runtime.InteropServices.SEHException: External component has thrown an exception. > at _CxxThrowException(Void* , _s__ThrowInfo* ) > at FIX.FieldMap.getField(FieldMap* , FieldBase* field) > at Application.create(Application* , Message* unmanaged) > at Application.toApp(Application* , Message* message, SessionID* sessionID) > at FIX.Session.sendToTarget(Message* , SessionID* ) > at QuickFix.Session.sendToTarget(Message message, SessionID sessionID) > at QuickFIXMessageProvider.MessageProvider.Test2() in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 357 > at QuickFIXMessageProvider.MessageProvider.ReceivedMsg(Message msg, String SenderCompID, String TargetCompID, String BeginString) in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 245 > Now, if I change my code above to use QuickFix40.NewOrderSingle (instead of QuickFix.Message), it works... > So just change line 04 to read: > > 04: QuickFix40.NewOrderSinglefixmsg = newQuickFix40.NewOrderSingle(); > (commenting out lines 08 and 20 which set the MsgType) > > With the above changes (using version-specific message class), sendToTarget works fine, regardles of which method signature I use... (and sendToTarget(fixmsg, sID) doesn't throw the above exception either, it works fine). > > I'd like to avoid using FIX version-specific code if possible, which is why I'm trying to figure out what I need to do to get my code above to work correctly. > > Any help would be appreciated. > > Rgds, > Alexandros > __________________________________________________________ > Not happy with your email address?. > Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html<hr>------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php<hr>_______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
From: J. M. <jul...@pr...> - 2008-07-01 15:01:19
|
I'm sure some of you have develop a library/class/methods that tranform FIX messages into FIXML and the oposite , can anyone share it with me? I'm using .NET QuickFIX... Thanks, Julian. |
From: Alex M. <ale...@ya...> - 2008-07-01 13:21:31
|
Your question pointed me in the right direction, I had compared the messages before, but it never occurred to me to look at the ordering of the fields closely: Working (QuickFix40.NewOrderSingle): Message to send: 8=FIX.4.0 | 9=78 | 35=D | 49=INITIATOR40 | 56=ACCEPTOR40 | 11=1786971871 | 21=2 | 38=1000 | 40=1 | 54=1 | 55=IBM | 10=044 | Not working (QuickFix.Message): Message to send: 8=FIX.4.0 | 9=78 | 49=INITIATOR40 | 56=ACCEPTOR40 | 11=1435599980 | 21=2 | 35=D | 38=1000 | 40=1 | 54=1 | 55=IBM | 10=042 | Even though the fields have the same values (minus ClOrdID, of course), I realised how dumb I was (head bashing on the wall right now), as the MsgType should have been part of the header not the message body. So changing line 20 to: 20: fixmsg.getHeader().setField(msgType); did the trick! I can't believe I spent so much time trying to figure such a silly mistake out! Guess it always helps to have another set of eyes look at things.... Thanks for your help! Rgds, Alexandros ----- Original Message ---- From: John Haldi <jo...@ha...> To: Alex Marangos <ale...@ya...> Sent: Tuesday, 1 July, 2008 2:01:34 PM Subject: RE: [Quickfix-developers] sendToTarget and "SessionNotFound" woes... Out of curiosity, could you provide the output of calling Console.WriteLine(fixmsg.tostring) so I could take a peek and see if there's something you've missed in the construction of the message (specifically the message header fields)? It would be interesting to compare this message to the one created by the strongly type version from quickfix40.newOrderSingle.... jh ________________________________ From: qui...@li... [mailto:qui...@li...] On Behalf Of Alex Marangos Sent: Tuesday, July 01, 2008 8:43 AM To: qui...@li... Subject: Re: [Quickfix-developers] sendToTarget and "SessionNotFound" woes... Same errors.. Apologies for the confusion, I was trying various combinations and I copied the latest (working) version of my INI file when I was using the type-safe code. Rgds, Alexandros ----- Original Message ---- From: John Haldi <jo...@ha...> To: Alex Marangos <ale...@ya...> Sent: Tuesday, 1 July, 2008 1:36:23 PM Subject: RE: [Quickfix-developers] sendToTarget and "SessionNotFound" woes... Alex, I'm a little confused. If you want to write FIX-version agnostic code, why are you using the DataDictionary for 4.0? I don't know the details under the hood for the SendToTarget method, but what happens if you change UseDataDictionary to N, strip the DataDictionary entry from the config file completely, and then use the SendToTarget(msg,sID) signature with the quickfix.message object? John ________________________________ From: qui...@li... [mailto:qui...@li...] On Behalf Of Alex Marangos Sent: Tuesday, July 01, 2008 8:11 AM To: qui...@li... Subject: [Quickfix-developers] sendToTarget and "SessionNotFound" woes... Hi all, I'm writing a simple QuickFix application (just evaluating it for now) in C#, and I'm having problems getting sendToTarget to work... Sorry for the length of this email, but I'm completely baffled by what does and doesn't work... So far, I've created a ThreadedSocketInitiator with the following config: [DEFAULT] ConnectionType=acceptor SocketAcceptPort=40000 ReconnectInterval=60 FileStorePath=Logs\QuickFIX.Acceptor FileLogPath=Logs\QuickFIX.Acceptor PersistMessages=Y [SESSION] BeginString=FIX.4.0 SenderCompID=ACCEPTOR40 TargetCompID=INITIATOR40 StartTime=00:00:00 EndTime=23:59:59 HeartBtInt=5 UseDataDictionary=Y DataDictionary=FIX40.xml ValidateFieldsHaveValues=Y ValidateFieldsOutOfOrder=N On the receiving end I have an instance of the executor running, with the appropriate session configuration. I can start both applications and the sessions connect and heartbeat. Now I'm confused as to what's needed when creating a FIX message and using sendToTarget() in my application, as in some cases it works, in others it doesn't. The code to create and send the message looks like: 01: stringbeginString = "FIX.4.0"; 02: stringsenderCompID = "INITIATOR40"; 03: stringtargetCompID = "ACCEPTOR40"; 04: QuickFix.Messagefixmsg = newQuickFix.Message(); 05: QuickFix..BeginStringbgn = newBeginString(beginString); 06: QuickFix.SenderCompIDscid = newSenderCompID(senderCompID); 07: QuickFix.TargetCompIDtcid = newTargetCompID(targetCompID); 08: QuickFix.MsgTypemsgType = newQuickFix.MsgType(QuickFix.MsgType.ORDER_SINGLE); 09: QuickFix.OrdTypeordType = newQuickFix.OrdType(QuickFix.OrdType.MARKET); 10: intrnd = newSystem.Random().Next(); 11: QuickFix.ClOrdIDclOrdID = newQuickFix.ClOrdID(rnd.ToString()); 12: QuickFix.HandlInsthandlInst = newQuickFix.HandlInst(QuickFix.HandlInst.AUTOMATED_EXECUTION_ORDER_PUBLIC); 13: QuickFix.OrderQtyorderQty = newQuickFix.OrderQty(1000); 14: QuickFix.Symbolsymbol = newQuickFix.Symbol("IBM"); 15: QuickFix.Sideside = newQuickFix.Side(QuickFix.Side.BUY); 16: fixmsg.getHeader().setField(bgn); 17: fixmsg.getHeader().setField(scid); 18: fixmsg.getHeader().setField(tcid); 19: fixmsg.setField(ordType); 20: fixmsg.setField(msgType); 21: fixmsg.setField(clOrdID); 22: fixmsg.setField(handlInst); 23: fixmsg.setField(symbol); 24: fixmsg.setField(side); 25: fixmsg.setField(orderQty); 26: fixmsg..setField(ordType); 27: Console.WriteLine("Message to send: {0}", fixmsg..ToString()); 28: Console.WriteLine("BeginString: {0}", beginString); 29: Console.WriteLine("SenderCompID: {0}", senderCompID); 30: Console.WriteLine("TargetCompID: {0}", targetCompID); 31: SessionIDsID = newSessionID(beginString, senderCompID, targetCompID); 32: Console.WriteLine("Session Exists: {0}", Session.doesSessionExist(sID)); 33: Session.sendToTarget(fixmsg, senderCompID, targetCompID); This throws a "SessionNotFound" error. Session.doesSessionExist(sID) returns "True", however... And if I replace sendToTarget() with: Session.sendToTarget(fixmsg, sID); I get an exception as follows: System.Runtime.InteropServices.SEHException: External component has thrown an exception. at _CxxThrowException(Void* , _s__ThrowInfo* ) at FIX..FieldMap.getField(FieldMap* , FieldBase* field) at Application.create(Application* , Message* unmanaged) at Application..toApp(Application* , Message* message, SessionID* sessionID) at FIX.Session.sendToTarget(Message* , SessionID* ) at QuickFix.Session.sendToTarget(Message message, SessionID sessionID) at QuickFIXMessageProvider.MessageProvider.Test2() in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 357 at QuickFIXMessageProvider.MessageProvider.ReceivedMsg(Message msg, String SenderCompID, String TargetCompID, String BeginString) in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 245 Now, if I change my code above to use QuickFix40.NewOrderSingle (instead of QuickFix.Message), it works... So just change line 04 to read: 04: QuickFix40.NewOrderSinglefixmsg = newQuickFix40.NewOrderSingle(); (commenting out lines 08 and 20 which set the MsgType) With the above changes (using version-specific message class), sendToTarget works fine, regardles of which method signature I use... (and sendToTarget(fixmsg, sID) doesn't throw the above exception either, it works fine). I'd like to avoid using FIX version-specific code if possible, which is why I'm trying to figure out what I need to do to get my code above to work correctly. Any help would be appreciated. Rgds, Alexandros ________________________________ Not happy with your email address? Get the one you really want - millions of new email addresses available now at Yahoo! No virus found in this incoming message. Checked by AVG. Version: 8.0.101 / Virus Database: 270.4.3/1526 - Release Date: 6/30/2008 8:43 AM ________________________________ Not happy with your email address? Get the one you really want - millions of new email addresses available now at Yahoo! No virus found in this incoming message. Checked by AVG. Version: 8.0.101 / Virus Database: 270.4.3/1528 - Release Date: 7/1/2008 7:26 AM __________________________________________________________ Not happy with your email address?. Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html |
From: Alex M. <ale...@ya...> - 2008-07-01 12:43:27
|
Same errors. Apologies for the confusion, I was trying various combinations and I copied the latest (working) version of my INI file when I was using the type-safe code. Rgds, Alexandros ----- Original Message ---- From: John Haldi <jo...@ha...> To: Alex Marangos <ale...@ya...> Sent: Tuesday, 1 July, 2008 1:36:23 PM Subject: RE: [Quickfix-developers] sendToTarget and "SessionNotFound" woes... Alex, I'm a little confused. If you want to write FIX-version agnostic code, why are you using the DataDictionary for 4.0? I don't know the details under the hood for the SendToTarget method, but what happens if you change UseDataDictionary to N, strip the DataDictionary entry from the config file completely, and then use the SendToTarget(msg,sID) signature with the quickfix.message object? John ________________________________ From: qui...@li... [mailto:qui...@li...urceforge..net] On Behalf Of Alex Marangos Sent: Tuesday, July 01, 2008 8:11 AM To: qui...@li... Subject: [Quickfix-developers] sendToTarget and "SessionNotFound" woes... Hi all, I'm writing a simple QuickFix application (just evaluating it for now) in C#, and I'm having problems getting sendToTarget to work... Sorry for the length of this email, but I'm completely baffled by what does and doesn't work.... So far, I've created a ThreadedSocketInitiator with the following config: [DEFAULT] ConnectionType=acceptor SocketAcceptPort=40000 ReconnectInterval=60 FileStorePath=Logs\QuickFIX.Acceptor FileLogPath=Logs\QuickFIX.Acceptor PersistMessages=Y [SESSION] BeginString=FIX.4.0 SenderCompID=ACCEPTOR40 TargetCompID=INITIATOR40 StartTime=00:00:00 EndTime=23:59:59 HeartBtInt=5 UseDataDictionary=Y DataDictionary=FIX40.xml ValidateFieldsHaveValues=Y ValidateFieldsOutOfOrder=N On the receiving end I have an instance of the executor running, with the appropriate session configuration. I can start both applications and the sessions connect and heartbeat. Now I'm confused as to what's needed when creating a FIX message and using sendToTarget() in my application, as in some cases it works, in others it doesn't. The code to create and send the message looks like: 01: stringbeginString = "FIX.4.0"; 02: stringsenderCompID = "INITIATOR40"; 03: stringtargetCompID = "ACCEPTOR40"; 04: QuickFix.Messagefixmsg = newQuickFix.Message(); 05: QuickFix.BeginStringbgn = newBeginString(beginString); 06: QuickFix.SenderCompIDscid = newSenderCompID(senderCompID); 07: QuickFix.TargetCompIDtcid = newTargetCompID(targetCompID); 08: QuickFix.MsgTypemsgType = newQuickFix.MsgType(QuickFix.MsgType.ORDER_SINGLE); 09: QuickFix.OrdTypeordType = newQuickFix.OrdType(QuickFix.OrdType.MARKET); 10: intrnd = newSystem.Random().Next(); 11: QuickFix.ClOrdIDclOrdID = newQuickFix.ClOrdID(rnd.ToString()); 12: QuickFix.HandlInsthandlInst = newQuickFix.HandlInst(QuickFix.HandlInst.AUTOMATED_EXECUTION_ORDER_PUBLIC); 13: QuickFix.OrderQtyorderQty = newQuickFix.OrderQty(1000); 14: QuickFix.Symbolsymbol = newQuickFix.Symbol("IBM"); 15: QuickFix.Sideside = newQuickFix.Side(QuickFix.Side.BUY); 16: fixmsg.getHeader().setField(bgn); 17: fixmsg.getHeader().setField(scid); 18: fixmsg.getHeader().setField(tcid); 19: fixmsg.setField(ordType); 20: fixmsg.setField(msgType); 21: fixmsg.setField(clOrdID); 22: fixmsg.setField(handlInst); 23: fixmsg.setField(symbol); 24: fixmsg.setField(side); 25: fixmsg.setField(orderQty); 26: fixmsg.setField(ordType); 27: Console.WriteLine("Message to send: {0}", fixmsg.ToString()); 28: Console.WriteLine("BeginString: {0}", beginString); 29: Console.WriteLine("SenderCompID: {0}", senderCompID); 30: Console.WriteLine("TargetCompID: {0}", targetCompID); 31: SessionIDsID = newSessionID(beginString, senderCompID, targetCompID); 32: Console.WriteLine("Session Exists: {0}", Session.doesSessionExist(sID)); 33: Session.sendToTarget(fixmsg, senderCompID, targetCompID); This throws a "SessionNotFound" error. Session.doesSessionExist(sID) returns "True", however... And if I replace sendToTarget() with: Session.sendToTarget(fixmsg, sID); I get an exception as follows: System.Runtime.InteropServices.SEHException: External component has thrown an exception. at _CxxThrowException(Void* , _s__ThrowInfo* ) at FIX.FieldMap.getField(FieldMap* , FieldBase* field) at Application.create(Application* , Message* unmanaged) at Application.toApp(Application* , Message* message, SessionID* sessionID) at FIX.Session.sendToTarget(Message* , SessionID* ) at QuickFix.Session.sendToTarget(Message message, SessionID sessionID) at QuickFIXMessageProvider.MessageProvider.Test2() in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 357 at QuickFIXMessageProvider.MessageProvider.ReceivedMsg(Message msg, String SenderCompID, String TargetCompID, String BeginString) in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 245 Now, if I change my code above to use QuickFix40.NewOrderSingle (instead of QuickFix.Message), it works... So just change line 04 to read: 04: QuickFix40.NewOrderSinglefixmsg = newQuickFix40.NewOrderSingle(); (commenting out lines 08 and 20 which set the MsgType) With the above changes (using version-specific message class), sendToTarget works fine, regardles of which method signature I use... (and sendToTarget(fixmsg, sID) doesn't throw the above exception either, it works fine). I'd like to avoid using FIX version-specific code if possible, which is why I'm trying to figure out what I need to do to get my code above to work correctly. Any help would be appreciated. Rgds, Alexandros ________________________________ Not happy with your email address? Get the one you really want - millions of new email addresses available now at Yahoo! No virus found in this incoming message. Checked by AVG. Version: 8.0.101 / Virus Database: 270.4.3/1526 - Release Date: 6/30/2008 8:43 AM __________________________________________________________ Not happy with your email address?. Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html |
From: Alex M. <ale...@ya...> - 2008-07-01 12:22:17
|
Shane, Thanks for the quick response. I'm trying to avoid using type-safe code, as I'd be handling multiple FIX versions at the same time and don't want to be re-writing code where not necessary. I already have a FIX-version specific process upstream, and I'm looking for a FIX engine that can act as a version-agnostic "middleware" to just create the messages and pass them on to the receiving end [as well as handling session-level aspects of connectivity etc]. Rgds, Alexandros ----- Original Message ---- From: Shane Trotter <str...@co...> To: Alex Marangos <ale...@ya...> Cc: qui...@li... Sent: Tuesday, 1 July, 2008 1:17:42 PM Subject: Re: [Quickfix-developers] sendToTarget and "SessionNotFound" woes... Alex, I believe using the type-safe/FIX-version specific code is the correct way to do it. Check http://quickfixengine.org/quickfix/doc/html/csharp/sending_messages_4.html for reference. Note the use of the QuickFix41 namespace. This is because each version is different, and ideally it should validate the correctness of a message of each version. -- Shane Trotter Connamara Systems, LLC On Tue, Jul 1, 2008 at 7:10 AM, Alex Marangos <ale...@ya...> wrote: QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Hi all, I'm writing a simple QuickFix application (just evaluating it for now) in C#, and I'm having problems getting sendToTarget to work... Sorry for the length of this email, but I'm completely baffled by what does and doesn't work... So far, I've created a ThreadedSocketInitiator with the following config: [DEFAULT] ConnectionType=acceptor SocketAcceptPort=40000 ReconnectInterval=60 FileStorePath=Logs\QuickFIX.Acceptor FileLogPath=Logs\QuickFIX.Acceptor PersistMessages=Y [SESSION] BeginString=FIX.4.0 SenderCompID=ACCEPTOR40 TargetCompID=INITIATOR40 StartTime=00:00:00 EndTime=23:59:59 HeartBtInt=5 UseDataDictionary=Y DataDictionary=FIX40.xml ValidateFieldsHaveValues=Y ValidateFieldsOutOfOrder=N On the receiving end I have an instance of the executor running, with the appropriate session configuration. I can start both applications and the sessions connect and heartbeat. Now I'm confused as to what's needed when creating a FIX message and using sendToTarget() in my application, as in some cases it works, in others it doesn't. The code to create and send the message looks like: 01: stringbeginString = "FIX.4.0"; 02: stringsenderCompID = "INITIATOR40"; 03: stringtargetCompID = "ACCEPTOR40"; 04: QuickFix.Messagefixmsg = newQuickFix.Message(); 05: QuickFix.BeginStringbgn = newBeginString(beginString); 06: QuickFix.SenderCompIDscid = newSenderCompID(senderCompID); 07: QuickFix.TargetCompIDtcid = newTargetCompID(targetCompID); 08: QuickFix.MsgTypemsgType = newQuickFix.MsgType(QuickFix.MsgType.ORDER_SINGLE); 09: QuickFix.OrdTypeordType = newQuickFix.OrdType(QuickFix.OrdType.MARKET); 10: intrnd = newSystem.Random().Next(); 11: QuickFix.ClOrdIDclOrdID = newQuickFix.ClOrdID(rnd.ToString()); 12: QuickFix.HandlInsthandlInst = newQuickFix.HandlInst(QuickFix.HandlInst.AUTOMATED_EXECUTION_ORDER_PUBLIC); 13: QuickFix.OrderQtyorderQty = newQuickFix.OrderQty(1000); 14: QuickFix.Symbolsymbol = newQuickFix.Symbol("IBM"); 15: QuickFix.Sideside = newQuickFix.Side(QuickFix.Side.BUY); 16: fixmsg.getHeader().setField(bgn); 17: fixmsg.getHeader().setField(scid); 18: fixmsg.getHeader().setField(tcid); 19: fixmsg.setField(ordType); 20: fixmsg.setField(msgType); 21: fixmsg.setField(clOrdID); 22: fixmsg.setField(handlInst); 23: fixmsg.setField(symbol); 24: fixmsg.setField(side); 25: fixmsg.setField(orderQty); 26: fixmsg.setField(ordType); 27: Console.WriteLine("Message to send: {0}", fixmsg.ToString()); 28: Console.WriteLine("BeginString: {0}", beginString); 29: Console.WriteLine("SenderCompID: {0}", senderCompID); 30: Console.WriteLine("TargetCompID: {0}", targetCompID); 31: SessionIDsID = newSessionID(beginString, senderCompID, targetCompID); 32: Console.WriteLine("Session Exists: {0}", Session.doesSessionExist(sID)); 33: Session.sendToTarget(fixmsg, senderCompID, targetCompID); This throws a "SessionNotFound" error. Session..doesSessionExist(sID) returns "True", however... And if I replace sendToTarget() with: Session.sendToTarget(fixmsg, sID); I get an exception as follows: System.Runtime.InteropServices.SEHException: External component has thrown an exception. at _CxxThrowException(Void* , _s__ThrowInfo* ) at FIX.FieldMap.getField(FieldMap* , FieldBase* field) at Application.create(Application* , Message* unmanaged) at Application.toApp(Application* , Message* message, SessionID* sessionID) at FIX.Session.sendToTarget(Message* , SessionID* ) at QuickFix.Session.sendToTarget(Message message, SessionID sessionID) at QuickFIXMessageProvider.MessageProvider.Test2() in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 357 at QuickFIXMessageProvider.MessageProvider.ReceivedMsg(Message msg, String SenderCompID, String TargetCompID, String BeginString) in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 245 Now, if I change my code above to use QuickFix40.NewOrderSingle (instead of QuickFix.Message), it works... So just change line 04 to read: 04: QuickFix40.NewOrderSinglefixmsg = newQuickFix40.NewOrderSingle(); (commenting out lines 08 and 20 which set the MsgType) With the above changes (using version-specific message class), sendToTarget works fine, regardles of which method signature I use... (and sendToTarget(fixmsg, sID) doesn't throw the above exception either, it works fine). I'd like to avoid using FIX version-specific code if possible, which is why I'm trying to figure out what I need to do to get my code above to work correctly. Any help would be appreciated. Rgds, Alexandros ________________________________ Not happy with your email address? Get the one you really want - millions of new email addresses available now at Yahoo! ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers __________________________________________________________ Not happy with your email address?. Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html |
From: Shane T. <str...@co...> - 2008-07-01 12:17:46
|
Alex, I believe using the type-safe/FIX-version specific code is the correct way to do it. Check http://quickfixengine.org/quickfix/doc/html/csharp/sending_messages_4.htmlfor reference. Note the use of the QuickFix41 namespace. This is because each version is different, and ideally it should validate the correctness of a message of each version. -- Shane Trotter Connamara Systems, LLC On Tue, Jul 1, 2008 at 7:10 AM, Alex Marangos <ale...@ya...> wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > Hi all, > > I'm writing a simple QuickFix application (just evaluating it for now) in > C#, and I'm having problems getting sendToTarget to work... Sorry for the > length of this email, but I'm completely baffled by what does and doesn't > work... > > So far, I've created a ThreadedSocketInitiator with the following config: > > [DEFAULT] > ConnectionType=acceptor > SocketAcceptPort=40000 > ReconnectInterval=60 > FileStorePath=Logs\QuickFIX.Acceptor > FileLogPath=Logs\QuickFIX.Acceptor > PersistMessages=Y > > [SESSION] > BeginString=FIX.4.0 > SenderCompID=ACCEPTOR40 > TargetCompID=INITIATOR40 > StartTime=00:00:00 > EndTime=23:59:59 > HeartBtInt=5 > UseDataDictionary=Y > DataDictionary=FIX40.xml > ValidateFieldsHaveValues=Y > ValidateFieldsOutOfOrder=N > > On the receiving end I have an instance of the executor running, with the > appropriate session configuration. I can start both applications and the > sessions connect and heartbeat. > > Now I'm confused as to what's needed when creating a FIX message and using > sendToTarget() in my application, as in some cases it works, in others it > doesn't. The code to create and send the message looks like: > > 01: string beginString = "FIX.4.0"; > 02: string senderCompID = "INITIATOR40"; > 03: string targetCompID = "ACCEPTOR40"; > 04: QuickFix.Message fixmsg = new QuickFix.Message(); > 05: QuickFix.BeginString bgn = new BeginString(beginString); > 06: QuickFix.SenderCompID scid = new SenderCompID(senderCompID); > 07: QuickFix.TargetCompID tcid = new TargetCompID(targetCompID); > 08: QuickFix.MsgType msgType = new QuickFix.MsgType(QuickFix.MsgType > .ORDER_SINGLE); > 09: QuickFix.OrdType ordType = new QuickFix.OrdType(QuickFix.OrdType > .MARKET); > 10: int rnd = new System.Random().Next(); > 11: QuickFix.ClOrdID clOrdID = new QuickFix.ClOrdID(rnd.ToString()); > 12: QuickFix.HandlInst handlInst = new QuickFix.HandlInst(QuickFix. > HandlInst.AUTOMATED_EXECUTION_ORDER_PUBLIC); > 13: QuickFix.OrderQty orderQty = new QuickFix.OrderQty(1000); > 14: QuickFix.Symbol symbol = new QuickFix.Symbol("IBM"); > 15: QuickFix.Side side = new QuickFix.Side(QuickFix.Side.BUY); > 16: fixmsg.getHeader().setField(bgn); > 17: fixmsg.getHeader().setField(scid); > 18: fixmsg.getHeader().setField(tcid); > 19: fixmsg.setField(ordType); > 20: fixmsg.setField(msgType); > 21: fixmsg.setField(clOrdID); > 22: fixmsg.setField(handlInst); > 23: fixmsg.setField(symbol); > 24: fixmsg.setField(side); > 25: fixmsg.setField(orderQty); > 26: fixmsg.setField(ordType); > 27: Console.WriteLine("Message to send: {0}", fixmsg.ToString()); > 28: Console.WriteLine("BeginString: {0}", beginString); > 29: Console.WriteLine("SenderCompID: {0}", senderCompID); > 30: Console.WriteLine("TargetCompID: {0}", targetCompID); > 31: SessionID sID = new SessionID(beginString, senderCompID, > targetCompID); > 32: Console.WriteLine("Session Exists: {0}", Session > .doesSessionExist(sID)); > 33: Session.sendToTarget(fixmsg, senderCompID, targetCompID); > > This throws a "SessionNotFound" error. Session.doesSessionExist(sID) > returns "True", however... > > And if I replace sendToTarget() with: > Session.sendToTarget(fixmsg, sID); > > I get an exception as follows: > System.Runtime.InteropServices.SEHException: External component has thrown > an exception. > at _CxxThrowException(Void* , _s__ThrowInfo* ) > at FIX.FieldMap.getField(FieldMap* , FieldBase* field) > at Application.create(Application* , Message* unmanaged) > at Application.toApp(Application* , Message* message, SessionID* > sessionID) > at FIX.Session.sendToTarget(Message* , SessionID* ) > at QuickFix.Session.sendToTarget(Message message, SessionID sessionID) > at QuickFIXMessageProvider.MessageProvider.Test2() in > C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 357 > at QuickFIXMessageProvider.MessageProvider.ReceivedMsg(Message msg, > String SenderCompID, String TargetCompID, String BeginString) in > C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 245 > > Now, if I change my code above to use QuickFix40.NewOrderSingle (instead of > QuickFix.Message), it works... > So just change line 04 to read: > > 04: QuickFix40.NewOrderSingle fixmsg = new QuickFix40.NewOrderSingle(); > (commenting out lines 08 and 20 which set the MsgType) > > With the above changes (using version-specific message class), sendToTarget > works fine, regardles of which method signature I use... (and > sendToTarget(fixmsg, sID) doesn't throw the above exception either, it works > fine). > > I'd like to avoid using FIX version-specific code if possible, which is why > I'm trying to figure out what I need to do to get my code above to work > correctly. > > Any help would be appreciated. > > Rgds, > Alexandros > > ------------------------------ > Not happy with your email address? > Get the one you really want <http://uk.docs.yahoo.com/ymail/new.html> - > millions of new email addresses available now at Yahoo!<http://uk.docs.yahoo.com/ymail/new.html> > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: Alex M. <ale...@ya...> - 2008-07-01 12:10:47
|
Hi all, I'm writing a simple QuickFix application (just evaluating it for now) in C#, and I'm having problems getting sendToTarget to work.... Sorry for the length of this email, but I'm completely baffled by what does and doesn't work... So far, I've created a ThreadedSocketInitiator with the following config: [DEFAULT] ConnectionType=acceptor SocketAcceptPort=40000 ReconnectInterval=60 FileStorePath=Logs\QuickFIX.Acceptor FileLogPath=Logs\QuickFIX.Acceptor PersistMessages=Y [SESSION] BeginString=FIX.4.0 SenderCompID=ACCEPTOR40 TargetCompID=INITIATOR40 StartTime=00:00:00 EndTime=23:59:59 HeartBtInt=5 UseDataDictionary=Y DataDictionary=FIX40.xml ValidateFieldsHaveValues=Y ValidateFieldsOutOfOrder=N On the receiving end I have an instance of the executor running, with the appropriate session configuration. I can start both applications and the sessions connect and heartbeat. Now I'm confused as to what's needed when creating a FIX message and using sendToTarget() in my application, as in some cases it works, in others it doesn't. The code to create and send the message looks like: 01: stringbeginString = "FIX.4.0"; 02: stringsenderCompID = "INITIATOR40"; 03: stringtargetCompID = "ACCEPTOR40"; 04: QuickFix.Messagefixmsg = newQuickFix.Message(); 05: QuickFix.BeginStringbgn = newBeginString(beginString); 06: QuickFix.SenderCompIDscid = newSenderCompID(senderCompID); 07: QuickFix.TargetCompIDtcid = newTargetCompID(targetCompID); 08: QuickFix.MsgTypemsgType = newQuickFix.MsgType(QuickFix.MsgType.ORDER_SINGLE); 09: QuickFix.OrdTypeordType = newQuickFix.OrdType(QuickFix.OrdType.MARKET); 10: intrnd = newSystem.Random().Next(); 11: QuickFix.ClOrdIDclOrdID = newQuickFix.ClOrdID(rnd.ToString()); 12: QuickFix.HandlInsthandlInst = newQuickFix.HandlInst(QuickFix.HandlInst.AUTOMATED_EXECUTION_ORDER_PUBLIC); 13: QuickFix..OrderQtyorderQty = newQuickFix.OrderQty(1000); 14: QuickFix.Symbolsymbol = newQuickFix.Symbol("IBM"); 15: QuickFix.Sideside = newQuickFix.Side(QuickFix.Side.BUY); 16: fixmsg.getHeader().setField(bgn); 17: fixmsg.getHeader().setField(scid); 18: fixmsg.getHeader().setField(tcid); 19: fixmsg.setField(ordType); 20: fixmsg.setField(msgType); 21: fixmsg.setField(clOrdID); 22: fixmsg.setField(handlInst); 23: fixmsg.setField(symbol); 24: fixmsg.setField(side); 25: fixmsg.setField(orderQty); 26: fixmsg.setField(ordType); 27: Console.WriteLine("Message to send: {0}", fixmsg.ToString()); 28: Console.WriteLine("BeginString: {0}", beginString); 29: Console.WriteLine("SenderCompID: {0}", senderCompID); 30: Console.WriteLine("TargetCompID: {0}", targetCompID); 31: SessionIDsID = newSessionID(beginString, senderCompID, targetCompID); 32: Console.WriteLine("Session Exists: {0}", Session.doesSessionExist(sID)); 33: Session.sendToTarget(fixmsg, senderCompID, targetCompID); This throws a "SessionNotFound" error. Session.doesSessionExist(sID) returns "True", however... And if I replace sendToTarget() with: Session.sendToTarget(fixmsg, sID); I get an exception as follows: System.Runtime.InteropServices.SEHException: External component has thrown an exception. at _CxxThrowException(Void* , _s__ThrowInfo* ) at FIX.FieldMap.getField(FieldMap* , FieldBase* field) at Application.create(Application* , Message* unmanaged) at Application.toApp(Application* , Message* message, SessionID* sessionID) at FIX.Session.sendToTarget(Message* , SessionID* ) at QuickFix.Session.sendToTarget(Message message, SessionID sessionID) at QuickFIXMessageProvider.MessageProvider.Test2() in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 357 at QuickFIXMessageProvider.MessageProvider.ReceivedMsg(Message msg, String SenderCompID, String TargetCompID, String BeginString) in C:\Temp\QuickFIX\Prototypes\Test\Properties\MessageSender.cs:line 245 Now, if I change my code above to use QuickFix40.NewOrderSingle (instead of QuickFix.Message), it works... So just change line 04 to read: 04: QuickFix40.NewOrderSinglefixmsg = newQuickFix40.NewOrderSingle(); (commenting out lines 08 and 20 which set the MsgType) With the above changes (using version-specific message class), sendToTarget works fine, regardles of which method signature I use... (and sendToTarget(fixmsg, sID) doesn't throw the above exception either, it works fine). I'd like to avoid using FIX version-specific code if possible, which is why I'm trying to figure out what I need to do to get my code above to work correctly. Any help would be appreciated. Rgds, Alexandros __________________________________________________________ Not happy with your email address?. Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html |
From: Kbo K. <kbo...@gm...> - 2008-07-01 10:18:27
|
<oren@...> writes: > There is not a setting for it currently, but you can go to Session.cpp > in the doTargetTooHigh method, and comment out this line: m_state.queue( > msgSeqNum, msg ); > > I believe that should do it. Just did that, and it seems to work. However, I am not sure the engine processes the 'too high' message at all (call it message N) - it seems to, but I fail to understand how since I don't queue it, and the resend request is only for 0 to N-1. Can anyone please explain? Thanks, Kbo |
From: <or...@qu...> - 2008-06-30 17:57:30
|
So you have the logs from this session? They should give more details about why the connection is failing. --oren > -------- Original Message -------- > Subject: [Quickfix-developers] Connection issue > From: "Julián_Mendiola" <jul...@pr...> > Date: Mon, June 30, 2008 12:54 pm > To: quickfix-users > <qui...@li...>,"or...@qu..." > <or...@qu...>,qui...@li... > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html<hr>I've been working with QuickFix as an Initiator client (ICE) and it run > great. But when I attempt to change the server (I need to connect to NYMEX > also) it just do not connect. The Setting field are the same and I've check > with NYMEX for the correct values... I've attached breakpoint in: > public void toAdmin(Message message, SessionID > sessionID){...........} > But it never go trow it, I imagine it never sent the loggin message. Why > could this be happening? Seems it can't connect to the socket port.... what > do you thing, someone go through this problem. How do I fix it? > The line where my application stop is: > this.initiator = new SocketInitiator(this.application, > storeFactory, this.settings, logFactory, messageFactory); > initiator.start(); > ------> while (!initiator.isLoggedOn()); > And my setting file is: > NYMEX Session > [SESSION] > BeginString=FIX.4.4 > SenderCompID=MyAsignedId > SenderSubID=TRDGR > TargetCompID=NYMEX > DeliverToCompID=CPT > StartTime=00:00:00 > EndTime=21:30:00 > HeartBtInt=30 > SocketConnectPort=443 > SocketConnectHost=204.10.10.233 > Password=my_password > UserName=my_username > EncryptMethod=0 > SessionQualifier=NYMEX > UseDataDictionary=Y > DataDictionary=C:\FIXML Definition\NymexFIX44.xml > Thanks, Julian.<hr>------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php<hr>_______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
From: J. M. <jul...@pr...> - 2008-06-30 17:54:57
|
I've been working with QuickFix as an Initiator client (ICE) and it run great. But when I attempt to change the server (I need to connect to NYMEX also) it just do not connect. The Setting field are the same and I've check with NYMEX for the correct values... I've attached breakpoint in: public void toAdmin(Message message, SessionID sessionID){...........} But it never go trow it, I imagine it never sent the loggin message. Why could this be happening? Seems it can't connect to the socket port.... what do you thing, someone go through this problem. How do I fix it? The line where my application stop is: this.initiator = new SocketInitiator(this.application, storeFactory, this.settings, logFactory, messageFactory); initiator.start(); ------> while (!initiator.isLoggedOn()); And my setting file is: NYMEX Session [SESSION] BeginString=FIX.4.4 SenderCompID=MyAsignedId SenderSubID=TRDGR TargetCompID=NYMEX DeliverToCompID=CPT StartTime=00:00:00 EndTime=21:30:00 HeartBtInt=30 SocketConnectPort=443 SocketConnectHost=204.10.10.233 Password=my_password UserName=my_username EncryptMethod=0 SessionQualifier=NYMEX UseDataDictionary=Y DataDictionary=C:\FIXML Definition\NymexFIX44.xml Thanks, Julian. |
From: <or...@qu...> - 2008-06-30 14:47:51
|
Static method shouldn't make a difference if there is no static variables, as each thread has its own stack. I'm really curious what this can be as well. Do you have any capability of reproducing this in a testing environment? --oren > -------- Original Message -------- > Subject: Re: [Quickfix-developers] FIX.IntConvertor.convert() > throwingexception > From: Rick Lane <ric...@gm...> > Date: Mon, June 30, 2008 9:19 am > To: qui...@li... > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html<hr>Hello all, just wondering if anyone had any luck discovering any issues > with the IntConvertor class with respect to concurrency issues - or if > there were any additional thoughts on the matter. For the life of me I > can't figure out what else could be causing this "/External component > has thrown an exception/" exception. > Thanks again, > Rick > Rick Lane wrote: > > John Haldi discovered that IntConvertor.convert() is a static method > > -- I have 2 threads that run concurrently in the following manner: > > > > Thread A (producer): > > ----------- > > 1) takes in raw compressed FAST data from the CME, converts it to a > > FIX string > > 2) takes FIX string and creates a QuickFix.Message object, passing the > > string into the constructor > > 3) checks the MsgSeqNum of this message ( message.getHeader().getInt(34) ) > > 3a) if MsgSeqNum is the next one it expects, it hands it off to > > the consumer (Thread B) > > 3b) if MsgSeqNum is /not /the next one, it creates a request to > > obtain the missed packets (this is on UDP so unreliable) > > > > Thread B (consumer): > > ---------- > > 1) listens for Thread A to add another QuickFix.Message to a shared Queue > > 2) Processes the message's fields > > > > So I'm wondering if the two red portions are causing these issues, > > because the low-level IntConvertor.convert() function is static. Even > > though the same message object will NEVER be accessed by more than one > > thread, if the same helper function is then I could see this causing a > > problem.... > > > > I don't see any shared/static member /variables /used by these > > methods, so I don't know how they could be interfering with each other > > -- but I thought I'd add this bit of information. > > > > Thanks, > > Rick > > > > John Haldi wrote: > >> Sorry it wasn't helpful. In looking at the source code for QF, I see > >> that the FIX.IntConvertor.convert function is indeed declared as a > >> shared method, but that and a buck will get you a cup of coffee. > >> From what you say there is no possibility of another thread calling > >> the convert function concurrently, so I'm somewhat at a loss as to > >> what could cause the function to fail. Its pretty straightforward > >> code in that function, so if something is wrong it should throw the > >> exception constantly. I'm still suspicious that something in the QF > >> library could be calling this function concurrently, but I have no > >> clue where to begin guessing... > >> > >> jh > >> > >> ------------------------------------------------------------------------ > >> *From:* Rick Lane [mailto:ric...@gm...] > >> *Sent:* Tuesday, June 24, 2008 11:39 AM > >> *To:* John Haldi > >> *Subject:* Re: [Quickfix-developers] FIX.IntConvertor.convert() > >> throwingexception > >> > >> John, > >> > >> Yes, my first thought was a threading issue as well, however I don't > >> believe it is one -- and if it is, it's not as straightforward as > >> your example below. Here's why: > >> > >> I am not establishing a FIX session -- I am simply using the QuickFix > >> library as a "utility" library to parse incoming FIX messages. The > >> CME (which I forget -- is this what you work with as well?) provides > >> /market data/ in FAST format ("FIX Adapted for STreaming" or > >> something like that) which is compressed data that I decode into a > >> string. Rather than re-invent the wheel and parse the string > >> representation of the FIX message myself, I simply create a > >> QuickFix.Message object passing this string into the constructor > >> (along with a DataDictionary). Then I can use the QuickFix functions > >> like getGroup, getIntField, etc..., and it does all the parsing > >> legwork for me. > >> > >> Also, there is only one thread listening to market data. > >> > >> Now, the /order routing /portion of my server /does /use a true > >> QuickFix "session" -- however for testing purposes, I'm not even > >> instantiating this, I'm /only /listening to the Market Data side of > >> things.... > >> > >> Thanks again for your time! > >> > >> Rick > >> > >> John Haldi wrote: > >>> Rick, > >>> > >>> Is it possible that somehow the group and/or the field in question > >>> is getting overwritten by a concurrent call on a different thread. > >>> My thinking is as follows: If you have a > >>> threadSocketInitiator/Acceptor working, perhaps every now and then > >>> two messages with this repeating group are coming in at the exact > >>> same time on two different threads, and that there is a helper > >>> function of some sort going on under the hood and one message is > >>> stomping on the other message - i.e. maybe the helper function is > >>> using a shared variable/class when it should be using an instance > >>> variable/class. > >>> > >>> The scenario I'm thinking of goes something like this: > >>> > >>> Thread #1 gets message with 10 group elements > >>> Thread #1 calls getGroup - getGroup stores group related info in a > >>> variable > >>> Thread #1 processes the first 5 of 10 group elements > >>> Thread #2 gets message with 3 group elements > >>> Thread #2 calls getGroup - getGroup stores group related info in the > >>> same variable > >>> Thread #1 now tries to access 6-10 of the group elements but they > >>> point to disposed memory > >>> Thread #1 throws a really nasty exception > >>> > >>> If we allow for something like the above as a possibility, it would > >>> explain 1) the seemingly intermittent nature of the problem, and 2) > >>> why you can't recreate it in a debugger. > >>> > >>> Its just a thought... > >>> > >>> John > >>> > >>> > >>> ------------------------------------------------------------------------ > >>> *From:* qui...@li... > >>> [mailto:qui...@li...] *On > >>> Behalf Of *Rick Lane > >>> *Sent:* Tuesday, June 24, 2008 11:13 AM > >>> *To:* qui...@li... > >>> *Subject:* Re: [Quickfix-developers] FIX.IntConvertor.convert() > >>> throwingexception > >>> > >>> What's interesting is that I take the message text from the message > >>> that causes the exception and then basically recreate the > >>> QuickFix.Message object with this string in a separate application, > >>> and make the same calls, and I don't get the exception. > >>> > >>> So it seems pretty obvious to me this isn't a message-formatting > >>> issue -- does this shed any light onto what might be the problem? > >>> Not sure why my Exception text is so vague (" External component has > >>> thrown an exception."). > >>> > >>> Rick Lane wrote: > >>>> Greetings, > >>>> > >>>> I have finally tracked down a bug that has been giving me problems > >>>> for some time. I'm getting an exception thrown in the > >>>> FIX.IntConvertor.convert(string) function, and I can't seem to > >>>> figure out why. It always happens at the same place: in an > >>>> Incremental Refresh message, I extract the NoMDEntries group. I > >>>> then try to extract the "price level" of the update (int field > >>>> 1023), and here is where I get the exception. Here is the stack trace: > >>>> > >>>> External component has thrown an exception. > >>>> at _CxxThrowException(Void* , _s__ThrowInfo* ) > >>>> at > >>>> FIX.IntConvertor.convert(basic_string<char\,std::char_traits<char>\,std::allocator<char> > >>>> >* value) > >>>> at QuickFix.Group.getField(IntField field) > >>>> at > >>>> MDPDataServer.MDPMarketDataProvider.ProcessMarketDataIncrementalRefresh > >>>> > >>>> and here's the line of code that's causing the exception: > >>>> > >>>> // message is a QuickFix.Message object constructed from the string > >>>> below > >>>> int numEntries = message.getInt(268); > >>>> for (uint i = 0; i < numEntries; i++) { > >>>> QuickFix44.MarketDataIncrementalRefresh.NoMDEntries group = new > >>>> QuickFix44.MarketDataIncrementalRefresh.NoMDEntries(); > >>>> message.getGroup(i + 1, group); > >>>> int priceLevel = group.getField(new IntField(1023)).getValue(); > >>>> // exception occurs here > >>>> ... > >>>> > >>>> What's strange is that I process millions of market data messages > >>>> every day and this only happens maybe 2 or 3 times a week -- my > >>>> first thought was that this was a FAST decoding issue (when I'm > >>>> building the text representation of the FIX message before QuickFix > >>>> is even used), but at such a low probability of occurrence, I can't > >>>> imagine this is a decoding issue. > >>>> > >>>> Here is the message that is throwing the exception; I've > >>>> highlighted the 1023 entries, and they all look fine to me -- any > >>>> thoughts? (also, to make it more readable/email friendly, I > >>>> removed the stop-bits and replaced them with the | character). > >>>> > >>>> Thanks, > >>>> Rick > >>>> > >>>> 8=FIX.4.2 | 9=1961 | 35=X | 34=1304872 | 49=CME | > >>>> 52=20080624115930866 | 75=20080624 | 268=22 | 279=1 | *1023=2* | > >>>> 269=0 | 270=45 | 271=85 | 273=115930000 | 336=2 | 276=K | 22=8 | > >>>> 48=801005 | 83=13568 | 279=1 | *1023=1* | 269=0 | 270=94 | 271=293 > >>>> | 273=115930000 | 336=2 | 276=K | 22=8 | 48=801101 | 83=38117 | > >>>> 279=1 | *1023=1* | 269=0 | 270=112.5 | 271=293 | 273=115930000 | > >>>> 336=2 | 276=K | 22=8 | 48=801109 | 83=35245 | 279=1 | *1023=2* | > >>>> 269=1 | 270=9551 | 271=1743 | 273=115930000 | 336=2 | 276=K | 22=8 > >>>> | 48=803001 | 83=231922 | 279=1 | *1023=1* | 269=1 | 270=9631 | > >>>> 271=1134 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=803900 | > >>>> 83=278737 | 279=1 | *1023=2* | 269=1 | 270=9631.5 | 271=12656 | > >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=803900 | 83=278738 | > >>>> 279=1 | *1023=1* | 269=1 | 270=9536 | 271=1175 | 273=115930000 | > >>>> 336=2 | 276=K | 22=8 | 48=806001 | 83=204449 | 279=1 | *1023=2* | > >>>> 269=1 | 270=9536.5 | 271=13774 | 273=115930000 | 336=2 | 276=K | > >>>> 22=8 | 48=806001 | 83=204450 | 279=1 | *1023=1* | 269=1 | 270=9612 > >>>> | 271=332 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=806901 | > >>>> 83=422681 | 279=1 | *1023=2* | 269=1 | 270=9612.5 | 271=17576 | > >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=806901 | 83=422682 | > >>>> 279=1 | *1023=2* | 269=1 | 270=9592 | 271=30035 | 273=115930000 | > >>>> 336=2 | 276=K | 22=8 | 48=809901 | 83=312614 | 279=1 | *1023=2* | > >>>> 269=0 | 270=17 | 271=47 | 273=115930000 | 336=2 | 276=K | 22=8 | > >>>> 48=800915 | 83=20839 | 279=1 | *1023=1* | 269=0 | 270=43 | 271=58 | > >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=801105 | 83=10961 | 279=2 > >>>> | *1023=1* | 269=1 | 270=44.5 | 271=12 | 273=115930000 | 336=2 | > >>>> 276=K | 22=8 | 48=801105 | 83=10962 | 279=1 | *1023=1* | 269=1 | > >>>> 270=45 | 271=12 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=801105 > >>>> | 83=10963 | 279=0 | *1023=2* | 269=1 | 270=45.5 | 271=216 | > >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=801105 | 83=10964 | 279=1 > >>>> | *1023=1* | 269=0 | 270=60 | 271=58 | 273=115930000 | 336=2 | > >>>> 276=K | 22=8 | 48=801113 | 83=9462 | 279=1 | *1023=2* | 269=0 | > >>>> 270=-4 | 271=24 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=801208 > >>>> | 83=3856 | 279=2 | *1023=2* | 269=1 | 270=9495.5 | 271=49 | > >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=803201 | 83=8643 | 279=0 > >>>> | *1023=2* | 269=1 | 270=9496 | 271=93 | 273=115930000 | 336=2 | > >>>> 276=K | 22=8 | 48=803201 | 83=8644 | 279=1 | *1023=1* | 269=0 | > >>>> 270=81 | 271=967 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=800208 > >>>> | 83=76335 | 279=1 | *1023=2* | 269=0 | 270=80.5 | 271=409 | > >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=800208 | 83=76336 | > >>>> 1128=8 | 10=233 | > >>>> > >>>> > >>>> > >>> No virus found in this incoming message. > >>> Checked by AVG. > >>> Version: 8.0.100 / Virus Database: 270.4.1/1516 - Release Date: > >>> 6/24/2008 7:53 AM > >>> > >> No virus found in this incoming message. > >> Checked by AVG. > >> Version: 8.0.100 / Virus Database: 270.4.1/1516 - Release Date: > >> 6/24/2008 7:53 AM > >><hr>------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php<hr>_______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
From: <or...@qu...> - 2008-06-30 14:44:51
|
Don't be confused, these are two different message classes. You've run into the .NET API for QuickFIX, which is a wrapper over the C++ API. Quickfix::Message is a .NET class, while FIX::Message is a C++ class. Those calls are not recursive, they are delegating work to another API. --oren > -------- Original Message -------- > Subject: [Quickfix-developers] FIXML guessing > From: "Julián_Mendiola" <jul...@pr...> > Date: Mon, June 30, 2008 9:09 am > To: qui...@li... > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html<hr>I'm trying to extend the QuickFix engine so it can support the FIXML format. > I've think in two solution, directly edit the C++ classes and recompile the > libraries or inherited from them and redefine the methods. But when a start > reading the C++ code I found some strange things, like for example: > bool Session::sendToTarget( Message* message ) > { QF_STACK_TRY > try > { > Message __pin * pMessage = message; > return FIX::Session::sendToTarget( pMessage->unmanaged() ); > } > catch ( FIX::SessionNotFound& ) { throw new SessionNotFound(); }; > QF_STACK_CATCH > } > This might one of the methods I'll have to redefine, but I still don't get > it. It is calling itself recursively. How can the message be send in this > terms...??? I look up for the message class to see what does the unmanaged() > method do.... > FIX::Message& unmanaged() > { return * m_pUnmanaged; } > Just return an attribute... so... let see where is that attribute is set... > Message() : disposed( false ) > { QF_STACK_TRY > m_pUnmanaged = new FIX::Message(); > m_header = new Header( this ); > m_trailer = new Trailer( this ); > QF_STACK_CATCH > } > This finish to confused me.... the method is call recursively allocating > memory for a new Message..... What!!!!!! Obviously I'm quite rusty with C++. > Please help!!!! > Greetings, Julian.<hr>------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php<hr>_______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
From: <or...@qu...> - 2008-06-30 14:39:37
|
My suggestion would be to pose the question to the fix protocol message boards. Unfortunately the wording of the spec can sometimes be a little ambiguous and gets subjected to different interpretations. I think members of the FPL can best clarify the proper behavior for everyone. --oren > -------- Original Message -------- > Subject: Re: [Quickfix-developers] SequenceReset bug? > From: Kbo Keplowsky <kbo...@gm...> > Date: Sun, June 29, 2008 4:49 pm > To: qui...@li... > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > There is not a setting for it currently, but you can go to Session.cpp > > in the doTargetTooHigh method, and comment out this line: m_state.queue( > > msgSeqNum, msg ); > > > > I believe that should do it. > Thanks. > I would like, however, to make sure I understand your point, since modifying > the DLL is not my first choice - I do trust you guys... > I looked at the description of the Sequence Reset Gap Fill message in > fixionary.com, and it states (for all types of this message): > "The sending application will initiate the Sequence Reset. The message in all > situations specifies NewSeqNo to reset to as the value of the next sequence > number to be expected by the message receipient immediately following the > messages and/or sequence numbers being skipped." > Are you saying that since the message in question explicitly specifies a Gap > Fill mode (123=Y), then it must fit with the previously sent messages (those > for which a resend was not requested), whether queued or not (since queuing is > recommended but not mandatory)? > This would suggest that in Gap-Fill mode, this message cannot be used to > arbitrarily reset the sequence number by the counterparty (it would take 123=N > to do that) - is that correct? > Please understand I'm asking this in order to be able to report the problem to > my counterparty in the form of a FIX protocol breach (otherwise I might be > kicked down the stairs). Is there anywhere I can get an official quote that > specifies this behavior? > Thanks again, > Kbo > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
From: Rick L. <ric...@gm...> - 2008-06-30 14:19:47
|
Hello all, just wondering if anyone had any luck discovering any issues with the IntConvertor class with respect to concurrency issues - or if there were any additional thoughts on the matter. For the life of me I can't figure out what else could be causing this "/External component has thrown an exception/" exception. Thanks again, Rick Rick Lane wrote: > John Haldi discovered that IntConvertor.convert() is a static method > -- I have 2 threads that run concurrently in the following manner: > > Thread A (producer): > ----------- > 1) takes in raw compressed FAST data from the CME, converts it to a > FIX string > 2) takes FIX string and creates a QuickFix.Message object, passing the > string into the constructor > 3) checks the MsgSeqNum of this message ( message.getHeader().getInt(34) ) > 3a) if MsgSeqNum is the next one it expects, it hands it off to > the consumer (Thread B) > 3b) if MsgSeqNum is /not /the next one, it creates a request to > obtain the missed packets (this is on UDP so unreliable) > > Thread B (consumer): > ---------- > 1) listens for Thread A to add another QuickFix.Message to a shared Queue > 2) Processes the message's fields > > So I'm wondering if the two red portions are causing these issues, > because the low-level IntConvertor.convert() function is static. Even > though the same message object will NEVER be accessed by more than one > thread, if the same helper function is then I could see this causing a > problem.... > > I don't see any shared/static member /variables /used by these > methods, so I don't know how they could be interfering with each other > -- but I thought I'd add this bit of information. > > Thanks, > Rick > > John Haldi wrote: >> Sorry it wasn't helpful. In looking at the source code for QF, I see >> that the FIX.IntConvertor.convert function is indeed declared as a >> shared method, but that and a buck will get you a cup of coffee. >> From what you say there is no possibility of another thread calling >> the convert function concurrently, so I'm somewhat at a loss as to >> what could cause the function to fail. Its pretty straightforward >> code in that function, so if something is wrong it should throw the >> exception constantly. I'm still suspicious that something in the QF >> library could be calling this function concurrently, but I have no >> clue where to begin guessing... >> >> jh >> >> ------------------------------------------------------------------------ >> *From:* Rick Lane [mailto:ric...@gm...] >> *Sent:* Tuesday, June 24, 2008 11:39 AM >> *To:* John Haldi >> *Subject:* Re: [Quickfix-developers] FIX.IntConvertor.convert() >> throwingexception >> >> John, >> >> Yes, my first thought was a threading issue as well, however I don't >> believe it is one -- and if it is, it's not as straightforward as >> your example below. Here's why: >> >> I am not establishing a FIX session -- I am simply using the QuickFix >> library as a "utility" library to parse incoming FIX messages. The >> CME (which I forget -- is this what you work with as well?) provides >> /market data/ in FAST format ("FIX Adapted for STreaming" or >> something like that) which is compressed data that I decode into a >> string. Rather than re-invent the wheel and parse the string >> representation of the FIX message myself, I simply create a >> QuickFix.Message object passing this string into the constructor >> (along with a DataDictionary). Then I can use the QuickFix functions >> like getGroup, getIntField, etc..., and it does all the parsing >> legwork for me. >> >> Also, there is only one thread listening to market data. >> >> Now, the /order routing /portion of my server /does /use a true >> QuickFix "session" -- however for testing purposes, I'm not even >> instantiating this, I'm /only /listening to the Market Data side of >> things.... >> >> Thanks again for your time! >> >> Rick >> >> John Haldi wrote: >>> Rick, >>> >>> Is it possible that somehow the group and/or the field in question >>> is getting overwritten by a concurrent call on a different thread. >>> My thinking is as follows: If you have a >>> threadSocketInitiator/Acceptor working, perhaps every now and then >>> two messages with this repeating group are coming in at the exact >>> same time on two different threads, and that there is a helper >>> function of some sort going on under the hood and one message is >>> stomping on the other message - i.e. maybe the helper function is >>> using a shared variable/class when it should be using an instance >>> variable/class. >>> >>> The scenario I'm thinking of goes something like this: >>> >>> Thread #1 gets message with 10 group elements >>> Thread #1 calls getGroup - getGroup stores group related info in a >>> variable >>> Thread #1 processes the first 5 of 10 group elements >>> Thread #2 gets message with 3 group elements >>> Thread #2 calls getGroup - getGroup stores group related info in the >>> same variable >>> Thread #1 now tries to access 6-10 of the group elements but they >>> point to disposed memory >>> Thread #1 throws a really nasty exception >>> >>> If we allow for something like the above as a possibility, it would >>> explain 1) the seemingly intermittent nature of the problem, and 2) >>> why you can't recreate it in a debugger. >>> >>> Its just a thought... >>> >>> John >>> >>> >>> ------------------------------------------------------------------------ >>> *From:* qui...@li... >>> [mailto:qui...@li...] *On >>> Behalf Of *Rick Lane >>> *Sent:* Tuesday, June 24, 2008 11:13 AM >>> *To:* qui...@li... >>> *Subject:* Re: [Quickfix-developers] FIX.IntConvertor.convert() >>> throwingexception >>> >>> What's interesting is that I take the message text from the message >>> that causes the exception and then basically recreate the >>> QuickFix.Message object with this string in a separate application, >>> and make the same calls, and I don't get the exception. >>> >>> So it seems pretty obvious to me this isn't a message-formatting >>> issue -- does this shed any light onto what might be the problem? >>> Not sure why my Exception text is so vague (" External component has >>> thrown an exception."). >>> >>> Rick Lane wrote: >>>> Greetings, >>>> >>>> I have finally tracked down a bug that has been giving me problems >>>> for some time. I'm getting an exception thrown in the >>>> FIX.IntConvertor.convert(string) function, and I can't seem to >>>> figure out why. It always happens at the same place: in an >>>> Incremental Refresh message, I extract the NoMDEntries group. I >>>> then try to extract the "price level" of the update (int field >>>> 1023), and here is where I get the exception. Here is the stack trace: >>>> >>>> External component has thrown an exception. >>>> at _CxxThrowException(Void* , _s__ThrowInfo* ) >>>> at >>>> FIX.IntConvertor.convert(basic_string<char\,std::char_traits<char>\,std::allocator<char> >>>> >* value) >>>> at QuickFix.Group.getField(IntField field) >>>> at >>>> MDPDataServer.MDPMarketDataProvider.ProcessMarketDataIncrementalRefresh >>>> >>>> and here's the line of code that's causing the exception: >>>> >>>> // message is a QuickFix.Message object constructed from the string >>>> below >>>> int numEntries = message.getInt(268); >>>> for (uint i = 0; i < numEntries; i++) { >>>> QuickFix44.MarketDataIncrementalRefresh.NoMDEntries group = new >>>> QuickFix44.MarketDataIncrementalRefresh.NoMDEntries(); >>>> message.getGroup(i + 1, group); >>>> int priceLevel = group.getField(new IntField(1023)).getValue(); >>>> // exception occurs here >>>> ... >>>> >>>> What's strange is that I process millions of market data messages >>>> every day and this only happens maybe 2 or 3 times a week -- my >>>> first thought was that this was a FAST decoding issue (when I'm >>>> building the text representation of the FIX message before QuickFix >>>> is even used), but at such a low probability of occurrence, I can't >>>> imagine this is a decoding issue. >>>> >>>> Here is the message that is throwing the exception; I've >>>> highlighted the 1023 entries, and they all look fine to me -- any >>>> thoughts? (also, to make it more readable/email friendly, I >>>> removed the stop-bits and replaced them with the | character). >>>> >>>> Thanks, >>>> Rick >>>> >>>> 8=FIX.4.2 | 9=1961 | 35=X | 34=1304872 | 49=CME | >>>> 52=20080624115930866 | 75=20080624 | 268=22 | 279=1 | *1023=2* | >>>> 269=0 | 270=45 | 271=85 | 273=115930000 | 336=2 | 276=K | 22=8 | >>>> 48=801005 | 83=13568 | 279=1 | *1023=1* | 269=0 | 270=94 | 271=293 >>>> | 273=115930000 | 336=2 | 276=K | 22=8 | 48=801101 | 83=38117 | >>>> 279=1 | *1023=1* | 269=0 | 270=112.5 | 271=293 | 273=115930000 | >>>> 336=2 | 276=K | 22=8 | 48=801109 | 83=35245 | 279=1 | *1023=2* | >>>> 269=1 | 270=9551 | 271=1743 | 273=115930000 | 336=2 | 276=K | 22=8 >>>> | 48=803001 | 83=231922 | 279=1 | *1023=1* | 269=1 | 270=9631 | >>>> 271=1134 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=803900 | >>>> 83=278737 | 279=1 | *1023=2* | 269=1 | 270=9631.5 | 271=12656 | >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=803900 | 83=278738 | >>>> 279=1 | *1023=1* | 269=1 | 270=9536 | 271=1175 | 273=115930000 | >>>> 336=2 | 276=K | 22=8 | 48=806001 | 83=204449 | 279=1 | *1023=2* | >>>> 269=1 | 270=9536.5 | 271=13774 | 273=115930000 | 336=2 | 276=K | >>>> 22=8 | 48=806001 | 83=204450 | 279=1 | *1023=1* | 269=1 | 270=9612 >>>> | 271=332 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=806901 | >>>> 83=422681 | 279=1 | *1023=2* | 269=1 | 270=9612.5 | 271=17576 | >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=806901 | 83=422682 | >>>> 279=1 | *1023=2* | 269=1 | 270=9592 | 271=30035 | 273=115930000 | >>>> 336=2 | 276=K | 22=8 | 48=809901 | 83=312614 | 279=1 | *1023=2* | >>>> 269=0 | 270=17 | 271=47 | 273=115930000 | 336=2 | 276=K | 22=8 | >>>> 48=800915 | 83=20839 | 279=1 | *1023=1* | 269=0 | 270=43 | 271=58 | >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=801105 | 83=10961 | 279=2 >>>> | *1023=1* | 269=1 | 270=44.5 | 271=12 | 273=115930000 | 336=2 | >>>> 276=K | 22=8 | 48=801105 | 83=10962 | 279=1 | *1023=1* | 269=1 | >>>> 270=45 | 271=12 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=801105 >>>> | 83=10963 | 279=0 | *1023=2* | 269=1 | 270=45.5 | 271=216 | >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=801105 | 83=10964 | 279=1 >>>> | *1023=1* | 269=0 | 270=60 | 271=58 | 273=115930000 | 336=2 | >>>> 276=K | 22=8 | 48=801113 | 83=9462 | 279=1 | *1023=2* | 269=0 | >>>> 270=-4 | 271=24 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=801208 >>>> | 83=3856 | 279=2 | *1023=2* | 269=1 | 270=9495.5 | 271=49 | >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=803201 | 83=8643 | 279=0 >>>> | *1023=2* | 269=1 | 270=9496 | 271=93 | 273=115930000 | 336=2 | >>>> 276=K | 22=8 | 48=803201 | 83=8644 | 279=1 | *1023=1* | 269=0 | >>>> 270=81 | 271=967 | 273=115930000 | 336=2 | 276=K | 22=8 | 48=800208 >>>> | 83=76335 | 279=1 | *1023=2* | 269=0 | 270=80.5 | 271=409 | >>>> 273=115930000 | 336=2 | 276=K | 22=8 | 48=800208 | 83=76336 | >>>> 1128=8 | 10=233 | >>>> >>>> >>>> >>> No virus found in this incoming message. >>> Checked by AVG. >>> Version: 8.0.100 / Virus Database: 270.4.1/1516 - Release Date: >>> 6/24/2008 7:53 AM >>> >> No virus found in this incoming message. >> Checked by AVG. >> Version: 8.0.100 / Virus Database: 270.4.1/1516 - Release Date: >> 6/24/2008 7:53 AM >> |