I think the programmatic way is just for you to create a 'non-durable' diverts. If you need persistent one, why don't you use configuration way?
if using integrated with JBoss7, JBoss7 has a new way to persist configuration changes (Config domain).
I don't have much details though as this is something under development and is is a specific feature from JBoss7.
Yong, I know I can use configuration but I need to create diverts "on the fly" based on user activity. If I use the configuration I have restart HornetQ.
Clebert, thank you for the reply. Is there any plan to implement persistent diverts, created programmatically? In my view it would be very useful to have persistent diverts the same way you can create persistent topics and queues.
Is there any other means I can use to move messages from one destination to another and persist that link programmatically? I read the whole documentation but could not find anything else.
You may open a JIRA if you like.
This would be simple enough for anyone to contribute a patch. We may help anyone willing to do it. (don't know if you guys think you could do it).
That's exactly what I was asking about. I saw that the Jira item is scheduled for version 2.3.0. Do you know what that means in terms of time.
I started looking at the HornetQ code with the idea to contribute but am finding it difficult to understand what happens where.
Everything happens through the StorageManager.
The Storagemanager will add specific record types for each scenario, and JournalStorageManager loadBindings would have to load those records back and recreate the structures.
I can give you more details if you are really interested in contributing the code.