Question

I am trying to handle a FIX Reject (MsgType 35=3), but I am unclear on how to retrieve the message that is referred to by the FIX Reject message.

The FIX Reject refers to the rejected message by MsgSeqNum, in the RefSeqNum field (tag 45). However I don't know how to get the rejected message by its sequence number. I think it should be possible because the FIX engine can resend messages in a sequence number range (in response to a resend request), so if the engine can do it so should I.

The question: how do I get the message that is referenced by the reject message in the RefSeqNum field?

Was it helpful?

Solution

Do you want to programmatically handle this failure? Generally the lower level rejects should never happen in the production environment. I have always dealt with them while testing and manual inspection of messages to identify the actual message and the tag having the problem.

In any case you can programmatically get the message by:

  1. First looking up the session using Session Session.lookupSession(SessionID sessionId)

  2. Get the MessageStore associated with the Session using MessageStore Session.getStore()

  3. Obtain the actual message using MemoryStore.get(int startSequence, int endSequence, Collection<String> messsages)

You can find API documentation for QuickFIX/J here, or visit the documentation folder.

Note that in step 3 you will have to pass the same sequence number as the start and the end sequence number.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top