|
From: Robert M. <rob...@eu...> - 2007-06-11 08:17:56
|
If you want to implement a re-connection strategy using FileStore,
you'll have to cleanup the files yourself. Quickfix doesn't close its
message files or log files when you do initiator.stop().
I got round this by casting
MessageStore store =3D session.getStore();
if (store instanceof FileStore) {
((FileStore) store).closeFiles();
}
=20
However for log files you will need to implement your own LogFactory and
Log that allows you to close files.
Rob
-----Original Message-----
From: qui...@li...
[mailto:qui...@li...] On Behalf Of t.s.
Sent: 11 June 2007 05:56
To: qui...@li...
Subject: [Quickfixj-users] QuickfixJ Initiator reconnection policy &
SeqNumResets
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Hello again, everyone :)
As per the subject, i'm wondering about QuickfixJ reconnection policy
(for initiators). Suppose an Initiator got disconnected (for whatever
reason: network problems, power problems, hardware problems,
acceptor/server maintenance, etc), what's gonna happen next ?
There were mentions about 'ReconnectInterval' parameter in the config
file; does it mean that the initiator will retry to reconnect
indefinitely? Is the mechanism reliable ?
I couldn't make it work (with a third party server, so i don't know much
about the implementation details on their side) during my earlier tests,
so i resorted to using a background thread to create another instance of
the initiator when it detected any problems with the current one. This
approach worked fine so far, with a rather nasty catch.
This morning, the initiator failed to reconnect after the normal
maintenance downtime during the weekend. Apparently the server/acceptor
did a seqnum reset during the maintenance period since the log contains
errors similar to these :
...
quickfix.SessionException MsgSeqNum too low,
expecting 1793530 but received 11797
...
Then i found some configuration parameters ('ResetOnDisconnect' and
'ResetOnLogout') which seems to be the answer, but enabling this on my
current implementation gave several 'File Delete Failed' error messages,
probably because the file is still open/used at this time.
So, after the long rambling, i suppose the question is: How do i reset
the seqnum ? :) Or am i supposed to use something other than a FileStore
?
Thanks in advance,
regards,
t.s.
PS: I found an older thread about something similar from a couple of
weeks ago, with the subject of "Initiator.Stop leaves file handles open
when using FileStore", but i'm not sure i understand the conclusion...
------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
Qui...@li...
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Eurobase International Limited and its subsidiaries (Eurobase) are =
unable to exercise control over the content of information in E-Mails. =
Any views and opinions expressed may be personal to the sender and are =
not necessarily those of Eurobase. Eurobase will not enter into any =
contractual obligations in respect of any part of its business in any =
E-mail.=20
Privileged / confidential information may be contained in this message =
and /or any attachments. This E-mail is intended for the use of the =
addressee(s) only and may contain confidential information. If you are =
not the / an intended recipient, you are hereby notified that any use or =
dissemination of this communication is strictly prohibited. If you =
receive this transmission in error, please notify us immediately, and =
then delete this E-mail.=20
Neither the sender nor Eurobase accepts any liability whatsoever for any =
defects of any kind either in or arising from this E-mail transmission. =
E-Mail transmission cannot be guaranteed to be secure or error-free, as =
messages can be intercepted, lost, corrupted, destroyed, contain =
viruses, or arrive late or incomplete. Eurobase does not accept any =
responsibility for viruses and it is your responsibility to scan any =
attachments.
Eurobase Systems Limited is the main trading company in the Eurobase =
International Group; registered in England and Wales as company number =
02251162; registered address: Essex House, 2 County Place, Chelmsford, =
Essex CM2 0RE, UK.
|