【问题标题】:Configure JMS Divert JBoss7 (HornetQ)配置 JMS 转移 JBoss7 (HornetQ)
【发布时间】:2014-06-09 21:09:46
【问题描述】:

我想为我的 hornetq 主题/队列配置一个转移。我正在使用 JBoss 7

我在standalone.xml中的消息子系统中配置了我的HornetQ

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

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

谢谢

【问题讨论】:

    标签: jboss jms jboss7.x hornetq


    【解决方案1】:

    我将转移放在子系统的错误部分,这可以通过使用 jboss-cli 运行以下命令轻松实现

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-01
      • 2013-05-24
      • 2012-10-29
      • 1970-01-01
      • 2023-03-08
      • 2017-02-18
      • 2011-12-23
      • 2021-09-08
      相关资源
      最近更新 更多