[Quickfix-developers] SendToTarget failure
Brought to you by:
orenmnero
From: John H. <jr...@ya...> - 2008-03-12 13:28:05
|
I have a test application which can send orders to an exchange. If for some reason my session is disconnected and I issue a SendToTarget, it returns "false". When I subsequently reconnect to the exchange, the order is sent out since it was queued in the fix space. I would like to be able to trap this scenario so that if a user tries to send orders out and the session is disconnected, it will fail and then *not* send the order on subsequent reconnection. My "nightmare" scenario is as follows: User is auto-quoting a stock and the line drops. hundreds of refreshed quotes are queued up somehow. The line comes back and all those quotes are sent, but the market has moved and we get a ton of unwanted executions. Is the best scenario to test the session status prior to calling SendToTarget? Or is there a method I can call or a config option I can set so that any attempted SendToTargets which failed while disconnected are not then sent? Can anybody recommend a "best practice" for this scenario? I realize that I of course should not be sending any Cxl/Replaces until I get a live order ack, but even so the scenario could come to life if I am quoting multiple lines and the session drops - the initial quote on each line will still be queued up waiting to go out and will be sent regardless of where the market is. Many thanks in advance for any suggestions, John |