Re: [Quickfix-developers] non logged-on messages
Brought to you by:
orenmnero
|
From: Caleb E. <cal...@gm...> - 2005-09-01 01:31:05
|
On 8/31/05, Brian Erst <azz...@ya...> wrote: I would expect that perhaps the first message that gets enqueued due to > a missing socket connection might have to be PosDup'd (perhaps the > socket connection disappeared during a send), but on subsequent > messages the engine would know for sure whether that message had ever > been sent to the counterparty (even though it may not know whether it > reached the counterparty). Almost by definition, any message with a > sequence number greater than the sequence number of last message that > actually reached a valid socket/network-stream object is NOT a PosDup. >=20 But you can't know which of your sequence numbers your counterparty is up= =20 to! Well, you could reconnect, or initiate a Test request and wait for the= =20 response. But sockets have buffers and networks go down and applications=20 crash, so a successful send() on your end doesn't always mean the other sid= e=20 will recv() it. So you may have think you have sent several messages that= =20 your counterparty never got. In our own home-rolled FIX engine we don't set the PosDup flag unless > the message is sent due to a sequence-resend request and the sequence > number is below the sequence number of the last known attempt at > transmission. But what if your last-known-attempt counter is too high (as I think I=20 describe above)? I think this behavior is in violation of the spec, which= =20 says that the PossDupFlag will be set to Y on any message sent in response= =20 to a resend request. If a counterparty asks you for a bunch of messages, yo= u=20 shouldn't presume to know better than they do which ones they haven't seen= =20 yet :-) --=20 Caleb Epstein caleb dot epstein at gmail dot com |