标签: activemq-artemis

带有独立 ActiveMQ 的 Wildfly 上的 ActiveMQ Artemis

我正在尝试使用MDB内置的 ActiveMQ Artemis 来连接 Wildfly 10 服务器,以连接到运行版本 5.13.3 的独立 ActiveMQ-Server。似乎 Artemis 无法与任何受支持的 ActiveMQ 协议进行通信。


ActiveMQ 独立代理具有以下功能transportConnectors

<transportConnectors>
    <transportConnector name="auto" uri="auto://localhost:5671?protocolDetectionTimeOut=5000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="http" uri="http://0.0.0.0:8180?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600" />
    <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> 
    <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> 
    <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> 
    <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
</transportConnectors>
Run Code Online (Sandbox Code Playgroud)

Wildfly MessageBean具有以下内容Annotation

@MessageDriven(activationConfig =
{
        @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
        @ActivationConfigProperty(propertyName="destination", "TestDestination"),
        @ActivationConfigProperty(propertyName="clientID", propertyValue = "test"),
        @ActivationConfigProperty(propertyName="connectionParameters", propertyValue = "host=127.0.0.1;port=5671"),  
        @ActivationConfigProperty(propertyName="connectorClassName", propertyValue = "org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory"),
        @ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="Auto-acknowledge")
}, mappedName = "TestDestination")
public class MessageProcessingBean implements MessageListener …
Run Code Online (Sandbox Code Playgroud)

java jms wildfly activemq-artemis

2
推荐指数
1
解决办法
2072
查看次数

ActiveMQ 主题上的并行消息消费

ActiveMQ 中的持久主题(这似乎是 JMS 本身的一个障碍)似乎只有一个使用者可以在订阅者上处于活动状态。

也就是说,在 ActiveMQ 文档中:

JMS 持久订阅者 MessageConsumer 是使用唯一的 JMS clientID 和持久订阅者名称创建的。要与 JMS 兼容,在任何时间点只能为一个 JMS clientID 激活一个 JMS 连接,并且对于一个 clientID 和订阅者名称只能激活一个使用者。即,只有一个线程可以从给定的逻辑主题订阅者中主动消费。

但是,其他排队系统(根据文档,Azure 服务总线似乎是这样做的)似乎很容易在单个“订阅”上允许多个线程“订阅者”。在这个时代,人们会认为这是理所当然的。

为什么会这样?这是否会在 JMS 和/或 ActiveMQ 的未来版本中得到解决?

PS,对于这种情况,“虚拟主题”(上面引用的文档)似乎不是一种理想且性能不佳的解决方法,因为它似乎在后台为每个订阅者创建了一个完全独立的队列。

java multithreading activemq-classic activemq-artemis

2
推荐指数
1
解决办法
1666
查看次数

Spring Boot JMS Producer 中的错误:AMQ212054 目标地址被阻止

我正在尝试使用 Spring Boot 2.1.1.RELEASE 连接到远程 Artemis 2.6.3 发件人。到目前为止,在我发现的所有示例中,发件人在尝试发送消息时挂起(例如https://grokonez.com/spring-framework/spring-jms/apache-artemis-produceconsume-jms-messages-springboot-阿尔忒弥斯应用程序)。控制台显示如下日志:

AMQ212054: Destination address=springbootQueue is blocked. If the system is configured to block make sure you consume messages on this configuration.
Run Code Online (Sandbox Code Playgroud)

我已经验证队列尚未在 broker.xml 中配置为 BLOCK。spring-boot-starter-artemis/Artemis 中是否有任何错误?

更新:我的 broker.xml

<?xml version='1.0'?>

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xi="http://www.w3.org/2001/XInclude"
               xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">

   <core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="urn:activemq:core ">

      <name>0.0.0.0</name>


      <persistence-enabled>true</persistence-enabled>

      <journal-type>ASYNCIO</journal-type>

      <paging-directory>data/paging</paging-directory>

      <bindings-directory>data/bindings</bindings-directory>

      <journal-directory>data/journal</journal-directory>

      <large-messages-directory>data/large-messages</large-messages-directory>

      <journal-datasync>true</journal-datasync>

      <journal-min-files>2</journal-min-files>

      <journal-pool-files>10</journal-pool-files>

      <journal-file-size>10M</journal-file-size>

      <journal-buffer-timeout>156000</journal-buffer-timeout>

      <journal-max-io>4096</journal-max-io>

      <disk-scan-period>5000</disk-scan-period>

      <max-disk-usage>90</max-disk-usage>

      <critical-analyzer>true</critical-analyzer>

      <critical-analyzer-timeout>120000</critical-analyzer-timeout>

      <critical-analyzer-check-period>60000</critical-analyzer-check-period>

      <critical-analyzer-policy>HALT</critical-analyzer-policy>

      <acceptors>

         <!-- Acceptor for every supported protocol -->
         <acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>

         <!-- …
Run Code Online (Sandbox Code Playgroud)

spring-boot activemq-artemis

2
推荐指数
1
解决办法
1627
查看次数

警告:网络上有多个服务器广播相同的节点 ID

我有一个由三个 ActiveMQ 代理组成的集群,它们在不同的计算机上运行。现在,我看到一条警告反复说明以下内容

2020-06-17 10:40:07,378 WARN  [org.apache.activemq.artemis.core.client] AMQ212034: There are more than one servers on the network broadcasting the same node id. You will see this message exactly once (per node) if a node is restarted, in which case it can be safely ignored. But if it is logged continuously it means you really do have more than one node on the same network active concurrently with the same node id. This could occur if you have a backup node …
Run Code Online (Sandbox Code Playgroud)

jms activemq-artemis

2
推荐指数
1
解决办法
2242
查看次数

如何在ActiveMQ Artemis中实现虚拟主题功能

ActiveMQ“经典”具有虚拟主题功能。这意味着消费者可以动态创建。ActiveMQ Artemis 如何管理此功能?

virtual-topic activemq-artemis

2
推荐指数
1
解决办法
1094
查看次数

WildFly 10 AMQ119032:用户没有地址上的 CREATE_NON_DURABLE_QUEUE 权限

我正在使用 WildFly 10.1..0.Final,我想使用 STOMP over WebSocket 连接 JavaScript 客户端。我正在使用 stomp.js。WildFly 包括 Apache ActiveMQ Artemis Message Broker 版本 1.1.0.wildfly-017。

首先,我使用 add-user.bat 添加了一个名为“myguest”的用户。该用户是“应用程序用户”。

接下来,我尝试了许多不同的方法来配置主题和安全设置。请检查我尝试配置主题的不同方式。两者都不起作用。

我尝试创建“jms.topic.chat”主题和一些变体。别工作。

我的standalone-full.xml 是:

   ...
   <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
        <server name="default">
            <security-setting name="#">
                <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
                <role name="myguest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
            </security-setting>
            <security-setting name="jms.topic.chat">
                <role name="myguest" send="true" consume="true" create-durable-queue="true" delete-durable-queue="true" create-non-durable-queue="true" delete-non-durable-queue="true" manage="true"/>
                <role name="guest" send="true" consume="true" create-durable-queue="true" delete-durable-queue="true" create-non-durable-queue="true" delete-non-durable-queue="true" manage="true"/>
            </security-setting>
            <security-setting name="topic.chat">
              <role name="myguest" send="true" consume="true" create-durable-queue="true" delete-durable-queue="true" create-non-durable-queue="true" delete-non-durable-queue="true" manage="true"/>
              <role name="guest" send="true" …
Run Code Online (Sandbox Code Playgroud)

javascript stomp websocket wildfly activemq-artemis

1
推荐指数
1
解决办法
5309
查看次数

如何从命令行进行 Artemis 队列?

有什么办法可以清除 Artemis 队列吗?我当时已经去净化了cd data/paging。这是我安装 Artemis 代理的位置。

有一个名为haw.ioartemis 的 UI,尽管我已经删除了分页目录中的所有文件,但它仍然在 UI 上显示该消息,在正确的情况下不应该在那里。

请建议。

activemq-artemis

1
推荐指数
1
解决办法
9778
查看次数

ActiveMQ Artemis 不是持久性的

我使用ActiveMQ Artemis进行数据传递,但队列中的数据不是持久的。

当我使用 artemis.cmd stop 关闭服务器并使用 artemis.cmd run 重新启动时,队列中的消息计数变为 0。

经纪人.xml:

<persistence-enabled>true</persistence-enabled>
<max-disk-usage>100</max-disk-usage>
Run Code Online (Sandbox Code Playgroud)

queue jms activemq-artemis

1
推荐指数
1
解决办法
1588
查看次数

为 ActiveMQ Artemis 中的特定记录器启用 TRACE

如何设置logging.properties记录转移artemis.log

我明白TRACE应该用于org.apache.activemq.artemis.core.server.impl.DivertImpl

我该如何设置它etc/logging.properties

activemq-artemis

1
推荐指数
1
解决办法
523
查看次数

?不运行示例。找不到 artemis.home 错误

当我想运行任何示例时出现错误mvn verify

[ERROR] ********************************************************************************************
[ERROR] Could not locate suitable Artemis.home on either D:\Documents\IdeaProjects\activemq-artemis\examples\features\standard\security\..\..\..\.. or D:\Documents\IdeaProjects\activemq-artemis\examples\features\standard\security\..
\..\..\..\artemis-distribution\target\apache-artemis-2.18.0-SNAPSHOT-bin\apache-artemis-2.18.0-SNAPSHOT
[ERROR] Use the binary distribution or build the distribution before running the examples
[ERROR] ********************************************************************************************
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.087 s
[INFO] Finished at: 2021-02-26T22:03:39+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.activemq:artemis-maven-plugin:2.18.0-SNAPSHOT:create (create) on project security: Couldn't find artemis.home -> [Help 1]
Run Code Online (Sandbox Code Playgroud)

我尝试在启动时指定artemis的目录路径,但没有帮助mvn verify -Dartemis.home="D:\Documents\apache-artemis-2.17.0"

如何修复这个错误?

activemq-artemis

1
推荐指数
1
解决办法
427
查看次数

ActiveMQ 阿尔忒弥斯

我正在尝试实施 ActiveMQ Artemis。Artemis 是 ActiveMQ 的一部分吗?

我正在尝试使定期任务delay-and-schedule-message-delivery ActiveMQ,但唯一有效的是延迟计划消息。文档中有关于核心 API 的说明:

通过在发送前在核心消息上设置相同的属性,也可以使用核心 API 发送预定消息。

所以这可能并不意味着我可以设置 ActiveMQ 属性。

我需要任何具有这些功能的消息队列:

  1. 重复任务(ActiveMQ“经典”)
  2. 重复任务检测(ActiveMQ Artemis)
  3. 数据持久化
  4. 消息修改 - 从队列中移除或更改重复延迟
  5. 弹簧集成

scheduled-tasks activemq-artemis

0
推荐指数
1
解决办法
1604
查看次数

Artemis:无法创建经纪人:功能未实现

我曾经在 Windows、Linux 和 WSL 上的 Artemis 中创建代理。从来没有出现过问题。除了我的一台装有 Windows 并运行 WSL2 的计算机。

我在安装 artemis 时做了同样的事情:

sudo groupadd artemis
sudo useradd -s /bin/false -g artemis -d /opt/artemis artemis
cd /opt
sudo wget https://archive.apache.org/dist/activemq/activemq-artemis/2.12.0/apache-artemis-2.12.0-bin.tar.gz
sudo tar -xvzf apache-artemis-2.12.0-bin.tar.gz
sudo mv apache-artemis-2.12.0 artemis
sudo chown -R artemis: artemis
sudo chmod o+x /opt/artemis/bin/
sudo rm apache-artemis-2.12.0-bin.tar.gz
Run Code Online (Sandbox Code Playgroud)

它安装了,但是当我尝试创建自己的代理实例时:

/opt/artemis/bin/artemis create --user app --password pwd --allow-anonymous test
Run Code Online (Sandbox Code Playgroud)

我收到以下错误消息:

Cannot initialize queue:Function not implemented
Run Code Online (Sandbox Code Playgroud)

我已经尝试了好几次,甚至卸载了artemis并删除了用户和组并重新启动了整个过程,但结果总是相同的。

我不知道有什么区别或如何解决问题。任何帮助将不胜感激!

更新 1:没有太多日志,但打开详细模式会给出以下几行:

Executing org.apache.activemq.artemis.cli.commands.Create create --verbose --user app --password pwd --allow-anonymous test …
Run Code Online (Sandbox Code Playgroud)

activemq-artemis windows-subsystem-for-linux

0
推荐指数
1
解决办法
1335
查看次数