Thank you Clebert, it looks like diverts will work for what we want to do.
I need to create and remove diverts programatically...
Would you happen to have any examples of how to do this using the core management queue?
I have read section 30.3... but it isn't clear to me what managed resource to call, or how to invoke the operation...
Am I right in thinking the managed resource is "HornetQServer", opertation is "deployDivert", and the parameter is a DivertConfiguration object?
Using HornetQServer directly would work, but that's not probably what you want. You probably want an upper level abstraction which is the HornetQServerControl.
Look at HornetQServerControl::createDivert. You can call that through either JMX, directly on the VM or through the JMS management.
While you could only perform inVM calls on the HornetQ server directly.
Anyway, Management will perform the call on the server for you. You can probably do it directly if you want.
BTW: I don't have an example at hand, but it should be easy with the information I gave you earlier.
Please ask more questions if you can't figure it out (with some specific code), so we can help you...