[Quickfix-developers] Custom tags, multiple versions of a message
Brought to you by:
orenmnero
From: John H. <jr...@ya...> - 2008-10-07 16:06:07
|
I have the following scenario I'm trying to sort out: - In my application (a FIX message gateway) I have just received a NewOrderSingle which contains a custom tag (tag 8000) containing some value - I want to send a copy of this order to three target sessions in this order: 1) The target destination for this order (i.e. ARCA) 2) A risk management system internal to our office 3) A database system which records the order for central archiving of trade activity - I DO NOT want the target destination (#1) to get custom tag 8000 - I DO want #2 and #3 to get custom tag 8000 What's the most efficient way of handling this scenario, if we assume that my entry point is the onMessage event handler for this message type? If I remove tag 8000 from the message prior to sending to #1, then I have to manually add it back before sending to #2 and #3. This would work if all I had was one custom tag to deal with, but my project requirement calls for a myriad of possible custom tags being developed in the 8000 range moving forward, the definition of which are t.b.d., so I'm hesitant to have to keep modifying this code. Is it possible to create a complete "copy" of the order, strip the custom tags from the original and send to #1, and then send the "copy" to #2 and #3? If so, how do I effect a copy of the original message. Everything I've tried (VB .NET) results in a pointer back to the original message, so that after I've stripped the custom tag it is also stripped from the so-called "copy". Am I going about this in entirely the wrong way? Is there another, better, way to "mask" certain fields on a SendToTarget and then unmask them on subsequent SendToTargets? Any help would be greatly appreciated. Many thanks, John |