tags:

views:

174

answers:

2

Given a sequence number, I need to find the corresponding request message string. I can't find a way to it easily do that with quickFix lib.

To be short, I've had the idea to use the FileStore "body" file to help me retrieve the message request string from a sequence number,as the FileStore class exposes a convenient method:
get(int begin, int end, std::vector result)

But I am facing an issue: as those files are accessed by another FileStore instance (from the Initiator instance) those files are inaccessible from any other part of my application under Windows OS: as it forbids a second owner on the those files.

Do I need to rewrite my own mechanism to get request message string form their sequence number?

A: 

I'm not sure why are you trying to get the 'message string' based on sequence number.

Is this during trading? Can you modify your application code? Your application gets the messages from the server/client so you can just dump the message as string (in c++ they have methods something to do with ToString() or similar).

You could keep the string in a dictionary with the sequence number as id and so on. The library gets you to peek at the outgoing messages as well.

If it is after traiding the messages you can set the engine to create data files and then just process the data file, it has all the messages received and sent.

Sorry, I just can't figure out what exactly you are trying to use.

stefanB
A: 

As long as the initiator/acceptor are using the file to log FIX messages, it would be harmful for you to interfere with the logging mechanism. Best option would be write one of your own logger file, where you dump all your FIX messages. This file you can then use to get the messages for your specific sequence number.

Writing and reading from the same file would be a slow, so you can cache a specific amount of messages in your memory before writing on to a file, in case your sequence number is from a recent lot of FIX messages..

DumbCoder
Why the down vote ?
DumbCoder