You don’t!
The whole point of topics is that the sender does not know who or is even interested in who will be processing the message. You can use filters on the subscriber side to narrow the subscriber so that a single topic can be used for more than target type. However, you should remember to keep filters a simple as possible otherwise it becomes horribly hard to understand the plumbing involved.
I appreciate that my answer maybe frustrating to you as you have a problem to solve. Thus could you explain your use case, that way it may be possible to suggest an alternative where the publisher doesn’t need to know the identity of the subscriber.
regards,
John.
#webMethods-Architecture#Integration-Server-and-ESB#webMethods