Re: [Quickfix-developers] Just Starting...
Brought to you by:
orenmnero
From: Patrick W. <pw...@ka...> - 2008-01-17 21:12:04
|
Yes that is right. When you call sendtoTarget the toApp callback should be called by the fix engine to allow you to do some processing before the message is sent (log it for example). Also you can throw a DoNotSend exception here to stop the message from being sent. toApp will also be called when the engine responds to a resend request. I have only been using this for a few months - other people may have a better insight into this. Patrick -----Original Message----- From: qui...@li... [mailto:qui...@li...] On Behalf Of azmat Sent: Friday, 18 January 2008 7:56 AM To: qui...@li... Subject: Re: [Quickfix-developers] Just Starting... QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Actually, I figured out the first part. =20 fromApp, call crack...crack distinguishes what type of message it is and calls the appropiate OnMessage that is overridden from MessageCracker...if onMessage for the specific message type is NOT implemented, than an UnsupportedMessageType exception is thrown. =20 So in the onMessage (execution report) I would write the business related code for what I need to do for when/if an executionReport is a type of message that is received, correct? =20 My confusion now lies with sending messages with sendToTarget and its relation to toApp? Should I call sendToTarget from toApp or will it somehow (again) magically end up in toApp? =20 thanks! Azmat Patrick, Thanks! This is perfect. I have something very similar now. I understand that I should call the crack method in the fromApp method so that the MessageCracker can identify exactly what type of message it is. That is really neat. But, what I do not get is how or when is the onMessage method is called (the one that takes the ExecutionReport parameter)? Is this something that automagically happens with the crack method if it determines the message is of type ExecutionReport? Also on the flipside of it. If I call sendToTarget from my business layer will it automatically go to the Application.toApp method OR do I need to somehow call toApp and then call sendToTarget from there? Any help would be much, much appreciated! thanks! Azmat --=20 View this message in context: http://www.nabble.com/Just-Starting...-tp14811784p14933076.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |