Question

I would like to configure a divert for my hornetq topics/queues. I am using JBoss 7

I configure my HornetQ in messaging subsystem in standalone.xml

 <subsystem xmlns="urn:jboss:domain:messaging:1.3">
        <hornetq-server>

I configure queues and topics here too

                    <jms-queue name="topic1">
                    <entry name="queue/queue1"/>
                    <entry name="java:jboss/exported/jms/queue/queue1"/>
                </jms-queue>
                 <jms-topic name="topic1">
                    <entry name="topic/topic1"/>
                     <entry name="java:jboss/exported/jms/topic/topic1"/>
                </jms-topic>

I would like to configure a divert..to divert the topic onto the queue like so:

           <!-- Attempting divert-->

<divert name="my-divert">
<address>jms.topic.topic1</address> 
<forwarding-address>jms.queue.topic1</forwarding-address> 
<exclusive>true</exclusive> </divert> --> 
<!-- end divert--> 
</hornetq-server>

If I place it in the stanalone.xml in messaging subsystem Jboss will not parse this on startup. Where should I place this config - can it live in stanadalone.xml?

Thanks

Was it helpful?

Solution

I was placing the divert in wrong part of subsystem, this can be easily achieved by running the following command using jboss-cli

 /subsystem=messaging/hornetq-server=default/divert=my-divert:add(divert-address=jms.topic.topic1,forwarding-address=jms.queue.queue1,exclusive=true)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top