gpt4 book ai didi

java - JBoss 大黄蜂Q : Set consumer-window-size for slow consumer

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:16:28 25 4
gpt4 key购买 nike

我想设置 <consumer-window-size/>0 .这似乎是另一个问题 ( JMS queue with multiple consumers ) 的答案,并在此 article 中进行了描述。在第 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>

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

最佳答案

在放置 netty-connector 之前,您需要查看您在 hornetq-configuration.xml 中注册的连接器

从你的 hornetq-configuration,你会看到这样的东西:

<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 关于接受器和连接器的文档。

关于java - JBoss 大黄蜂Q : Set consumer-window-size for slow consumer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7021485/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com