我想将<consumer-window-size/>设置为0。这似乎是另一个问题( JMS queue with multiple consumers )的答案,并在17.1.1章的这个article中进行了描述。我使用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><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.]这可能与JBoss-6相关,因为在其他环境中这似乎是有效的:force order of messages with HornetQ
发布于 2011-08-11 23:45:49
在放置netty-connector之前,您需要查看已经在hornetq-configuration.xml ation.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>您将在您的连接工厂定义中匹配这里的连接器。
有关更多信息,请阅读HornetQ关于接受器和连接器的文档。
https://stackoverflow.com/questions/7021485
复制相似问题