I have the need for an application to explicitely tap all message traffic through DDS. I am not talking about a silent background mechanism, but more a way to implement this with some clever topic design. Multitopic maybe? Say for instance, all instances are published to the unique application defined topic, as well as a well known global topic when some global flag is true set. Are there any other options?
I do not completely understand your question. Are you talking about the situation where your datamodel is known in advance? I am assuming not -- you are talking about a 'well known global topic' which implies other 'less known topics'.
If the topics are not known in advance, I still do not understand how that global topic would help you, unless you would be using some serialization function that translates your data into a 'well known string representation'.
Some DDS immplementations (like OpenSplice DDS) support ways to dynamically discover (at runtime) topics, create subscriptions for them and 'tap' samples of these topics. Such dynamic capability is typically used by tooling and utilizes more dynamic API's (for instance XML-based) than the 'static' regular DDS-API's that are type-specificly generated from IDL-types.
Not sure this relates (enough) to your question yet