Tho*_*hor 7 java hornetq jboss6.x
我想设置<consumer-window-size/>为0.这似乎是另一个问题(具有多个消费者的JMS队列)的答案,并在本文的第17.1.1节中进行了描述.我使用JNDI检索连接工厂.我hornetq-jms.xml看起来像这样:
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
<connection-factory name="ConnectionFactory">
<connectors>
<connector-ref connector-name="netty-connector"/>
</connectors>
<entries>
<entry name="ConnectionFactory"/>
</entries>
<consumer-window-size>0</consumer-window-size>
</connection-factory>
<queue name="my.qeue">
<entry name="/queue/test"/>
</queue>
</configuration>
Run Code Online (Sandbox Code Playgroud)
该部分<connection-factory/>是从上面的链接复制和粘贴,但我收到错误:
DEPLOYMENTS IN ERROR:
Deployment "org.hornetq:module=JMS,name="ConnectionFactory",
type=ConnectionFactory" is in error due to the following reason(s):
HornetQException[errorCode=104 message=There is no connector with
name 'netty-connector' deployed.]
Run Code Online (Sandbox Code Playgroud)
这可能与JBoss-6相关,因为在其他环境中这似乎有效:用HornetQ强制消息顺序
Cle*_*nic 10
在放置netty-connector之前,您需要查看已在hornetq-configuration.xml中注册的连接器
从你的hornetq配置,你会看到这样的东西:
<connectors>
<connector name="netty">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="${jboss.bind.address:localhost}" />
<param key="port" value="${hornetq.remoting.netty.port:5445}" />
</connector>
<connector name="in-vm">
<factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
<param key="server-id" value="${hornetq.server-id:0}" />
</connector>
</connectors>
Run Code Online (Sandbox Code Playgroud)
您将在连接工厂定义中匹配连接器.
有关更多信息,请阅读HornetQ关于接收器和连接器的文档.
| 归档时间: |
|
| 查看次数: |
3711 次 |
| 最近记录: |