Re: [Quickfix-developers] Does QuickFix implement Message Queue mechanism to make sure all messages
Brought to you by:
orenmnero
From: Joerg T. <Joe...@ma...> - 2004-09-02 09:04:51
|
Hi Frank, > I'm trying to make use of quickfix to replace the old fix gateway(ugly > code, not flexible, only support fix4.0) in my company. Good to hear that. That is the idea behind QuickFIX: Joining efforts to get one, high quality solution. > I have many years of socket programming experience. Every time when I > write a tcp socket program, I'll worry about buffering of read and write > stream, queueing of messages ready to send, queueing of messages > received and waiting for handling. If I add such kinds of handling in > the socket program, the program will be really very stable and robust; > if not, errors will occur after it runs for some time. Actually, the FIX protocol itself is independent of the underlying transport, it would also work with UDP. The session level protocol takes care of lost and out-of-order messages, so if an implementation fully implements the session level protocol of FIX (which QF does), you should not worry about this. > My question is: Does QuickFix have such kinds of handling ? especially > message queue mechanism ? May I borrow it to deal with other sockets > (My program is a fix gateway, one side connects trading system (not fix > protocol), one side connects ECN(fix protocol)) ? For the incoming data, there is now queue/buffer besides the TCP buffer, so that every message read is immediately forwarded to the fromApp() or fromAdmin() callback. So it is the responsibility of the application to queue these message if needed. The outgoing data is saved in a messsage store (file, database, your own implementation). You can send data to a session as soon as it is created (onCreate() callback triggered). This is independent of the logon state of the session, i.e. you can send messages to a session if it is logged off. If the session gets logged on again, these messages are transferred. The reason behind that is the requirement of the FIX protocol to be always able to resend messages. If this does not answer your question, please do not hesitate to ask. BTW, do you have some new exchange/ECN to be added to our WikiFIX? 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 |