2014-04-24 66 views
0

我想为我的hornetq主题/队列配置转向。我使用JBoss 7配置JMS转移JBoss7(HornetQ)

配置我的通讯子系统的HornetQ在standalone.xml

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

我配置队列和主题在这里太

    <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> 

我想配置转向..将主题转移到队列上,如下所示:

  <!-- 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> 

如果我将它放在s中消息传递子系统中的tanalone.xml Jboss在启动时不会解析此消息。我应该在哪里放置这个配置 - 它可以住在stanadalone.xml中吗?

由于

回答

0

我被放置在子系统的错误部分的转接,这可以容易地通过运行使用JBoss-CLI以下命令实现

/subsystem=messaging/hornetq-server=default/divert=my-divert:add(divert-address=jms.topic.topic1,forwarding-address=jms.queue.queue1,exclusive=true)