如何使用 ActiveMQ Artemis 在 Wildfly 24 服务上配置 jms-queue

Posted

技术标签:

【中文标题】如何使用 ActiveMQ Artemis 在 Wildfly 24 服务上配置 jms-queue【英文标题】:How to configure jms-queue on Wildfly 24 service using ActiveMQ Artemis 【发布时间】:2021-11-24 00:31:40 【问题描述】:

我正在尝试在 WildFly 24 上配置一个简单的 JMS 消息队列。我正在使用 standalone-full.xml 启动服务器。我看到以下配置:

<subsystem xmlns="urn:jboss:domain:messaging-activemq:13.0">
    <remote-connector name="artemis" socket-binding="messaging-activemq">
        <param name="use-nio" value="true"/>
        <param name="use-nio-global-worker-pool" value="true"/>
    </remote-connector>
    <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="artemis" transaction="xa" user="guest" password="guest" />
</subsystem>

我已关注the documentation,并将以下配置添加到standalone-full.xmlstandalone-full-ha.xml 配置中:

<subsystem xmlns="urn:jboss:domain:messaging-activemq:13.0">
    <server name="default">
        <http-connector name="http-connector"
                        socket-binding="http"
                        endpoint="http-acceptor" />
        <http-connector name="http-connector-throughput"
                        socket-binding="http"
                        endpoint="http-acceptor-throughput">
            <param name="batch-delay"
                   value="50"/>
        </http-connector>
        <in-vm-connector name="in-vm"
                         server-id="0"/>
      <connection-factory name="InVmConnectionFactory"
                            connectors="in-vm"
                            entries="java:/ConnectionFactory" />
      <pooled-connection-factory name="activemq-ra"
                            transaction="xa"
                            connectors="in-vm"
                            entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory"/>
       <jms-queue name="testQueue"
               entries="jms/queue/test java:jboss/exported/jms/queue/test" />
   </server>
</subsystem>

服务器无法启动并出现以下异常:

WFLYCTL0362: Capabilities required by resource '/subsystem=messaging-activemq/server=default' are not available: org.wildfly.security.legacy-security-domain.other; There are no known registration points which can provide this capability.

WildFly 文档是否过时?我在这里错过了什么吗?请告诉我在 WildFly 24 中配置 jms-queue 的正确方法

【问题讨论】:

【参考方案1】:

默认情况下,如果未定义安全域(已弃用)或 elytron 域,则安全域为旧版“其他”。您需要为您的其中一个配置这样的安全域或恢复旧的“其他”域。

【讨论】:

如果我理解正确没有定义安全域我们不能为activemq子系统定义一个新的服务器配置?由于我使用的是本地主机部署,因此我不希望为 activemq 子系统定义任何安全域,standaline-full.xml 附带的默认 activemq 配置是否足够好?我们需要默认消息传递所需的任何其他配置吗?请发布所需的配置以配置安全域 standalone-full.xml 提供了这样的配置。 我想知道您是否可以显示最终配置的示例。我遇到了完全相同的问题。 我遇到了完全相同的错误,我将这段摘录添加到服务器元素中:。我仍然不相信这对我来说是正确的 elytron 域,但我更进一步。

以上是关于如何使用 ActiveMQ Artemis 在 Wildfly 24 服务上配置 jms-queue的主要内容,如果未能解决你的问题,请参考以下文章

如何使用 ActiveMQ Artemis 在 Wildfly 24 服务上配置 jms-queue

如何使用嵌入式 ActiveMQ Artemis 为 Spring Boot 配置 max-delivery-attempts?

带有独立 ActiveMQ 的 Wildfly 上的 ActiveMQ Artemis

Artemis安装

Centos 下activemq 升级到apache-artemis

Apache ActiveMQ Artemis简介