gpt4 book ai didi

jboss - ActiveMQ - 客户端已连接但有相同的 clientId 错误

转载 作者:行者123 更新时间:2023-12-03 13:40:14 31 4
gpt4 key购买 nike

我们有一个连接到 ActivMQ apache-activemq-5.14.3 的 JBoss EAP 7.0.0.GA 设置。我们正在尝试使用以下配置设置持久订阅者:

@MessageDriven(
name = "TestListener",
activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Topic"),

@ActivationConfigProperty(propertyName = "subscriptionDurability",
propertyValue = "Durable"),

@ActivationConfigProperty(propertyName = "subscriptionName",
propertyValue = "subscriptionNameTest"),

@ActivationConfigProperty(propertyName = "clientId",
propertyValue = "2"),

@ActivationConfigProperty(propertyName = "destination",
propertyValue = "jms/testTopic")
}
)
@PermitAll
@ResourceAdapter(value="activemq-rar.rar")

但是,我们在 JBoss 服务器控制台中收到以下异常

ERROR [org.apache.activemq.ra.ActiveMQEndpointWorker] (default-threads - 4) Failed to connect to broker [tcp://127.0.0.1:61616?jms.rmIdFromConnectionId=true]: Broker: TestBroker    - Client: 2 already connected from tcp://127.0.0.1:64246: javax.jms.InvalidClientIDException: Broker: TestBroker - Client: 2 already connected from tcp://127.0.0.1:64246

同时如果我们在activmq看到如下日志:

WARN  | Failed to add Connection ID: 40600-51:1 due to javax.jms.InvalidClientIDException: Broker: TestBroker - Client: 2 already connected from tcp://127.0.0.1:64246 | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport: tcp:///127.0.0.1:50170@61616

ActiveMQManagedConnectionFactory 设置如下(尝试将 max-pool-size 设置为 1,但没有效果):

/subsystem=resource-adapters/resource-adapter=activemq-rar.rar/connection-definitions=ConnectionFactory:add(class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory", jndi-name="java:/MyConnectionFactory", enabled=true, min-pool-size=1, max-pool-size=20, pool-prefill=false, same-rm-override=false, recovery-username=ejb_user, recovery-password=xxxxx)

请向 AMQ 专家寻求帮助。

最佳答案

我能够让 AMQ 和 jboss 在没有一千个线程做愚蠢事情的情况下运行的唯一方法是使用嵌入式代理设置 RAR,然后将嵌入式代理与外部代理网络连接。

关于jboss - ActiveMQ - 客户端已连接但有相同的 clientId 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42697494/

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