'Unique identifier for all fix messages related to a sinqle request in quickfix

We need to get a unique identifier for all related fix messages in quickfixj. scenario: if B lies between A and C and forwards fix messages from A to C and vice versa, we need to get a unique Id for all related messages to cache them in B.

Is there a uniqueId for all fix messages as mentioned above? if yes, does getting that unique identifier same (eg: message.getString(int field)) for all message types, or getting it depends on message type?



Solution 1:[1]

Do you mean a unique identifier per Order, for example? If yes, then that would be 11/ClOrdID for a NewOrderSingle (and some other message types). But you'll have other identifiers for other message types, e.g. quotes, market data snapshots, ...

There is no global unique identifier per se, so you would need to make one up. For example a concatenation of SenderCompID and MsgSeqNum and SendingTime should be unique. If you are sure that you will not reset the sequence number intra-day you could probably even leave out the SendingTime.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Christoph John