Martin Tanguay wrote:
> Is there a parameter to avoid the quickfix session to buffer the
> outgoing messages if it is not actually connected?
No, a FIX session exists independent of whether there is a connection between the two
parties. Its starts at sequence number 1 and ends at some arbitrarily high integer N.
FIX requires the sender to save all outgoing messages to satisfy any resend requests from
the other side. Basically you never know whether the other side has received all messages
sent by you. FIX is optimistic here; it is assumed that every messages arrived unless told
otherwise (by a ResendRequest).
Therefore, QuickFIX stores (buffers) all message send to a session and forwards them to
the other side if (or as soon) it has a connection.
But you could check session.isLoggedOn() to check whether a session is currently logged on
before you use sendToTarget() to send any messages to it. Or you could watch the current
session state using the Application callbacks onLogon() and onLogout().
Why do you need that functionality?
> Let's say that a client sends multiple messages, without being
> connected. When he connect, all previous message are sent. Is there a
> built-in parameter that avoid that? I tried :
> CheckLatency=Y
> MaxLatency=10
This parameter tells which latency should be tolerated, ie the SendingTime field of the
incoming message contains time X, and you receive this messsage at time X+N. Then N is the
latency. If N > 10 in your case, the connection is dropped due to latency problems.
Cheers, Jörg
--
Joerg Thoennes
http://macd.com
Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH
Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen
|