JBoss HornetQ:为慢速消费者设置消费者窗口大小
我想将
设置为 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>
部分是从上面的链接复制并粘贴的,但我收到错误:
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.]
This可能与 JBoss-6 相关,因为在其他环境中这似乎有效: force order of与 HornetQ 的消息
I want to set the <consumer-window-size/>
to 0
. This seems to be the answer of another question ( JMS queue with multiple consumers ), and is described in this article in chapter 17.1.1 . I retrieve the connection factory using JNDI. My hornetq-jms.xml
looks like this:
<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>
The section <connection-factory/>
is copy&paste from the link above, but I got the error:
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.]
This may be JBoss-6 related, because in other environments this seems to work: force order of messages with HornetQ
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在放置 netty-connector 之前,您需要查看在 hornetq-configuration.xml 中注册的连接器。
从您的 hornetq-configuration 中,您将看到如下内容:
You will have match the Connector here at your connection-factoryDefinition 。
有关更多信息,请阅读 HornetQ 有关接受器和连接器的文档。
Before you place netty-connector, you need to look at the connectors your have registered at your hornetq-configuration.xml
From your hornetq-configuration, you will see something like this:
You will have match the connector here at your connection-factory definition.
For more information read the HornetQ's documentation about acceptors and connectors.