Sam*_*uel 16 activemq-classic spring-boot activemq-artemis
我正在尝试使用新的命名空间jakarta而不是迁移到 Spring Boot 3 javax,但 ActiveMQ Classic 客户端尚未更新并且已被弃用。有没有办法继续使用旧的ActiveMQ客户端?
我尝试了新的 ActiveMQ Artemis 客户端,但它们似乎无法与 ActiveMQ Classic 服务器互操作。包含旧的 ActiveMQ 客户端会导致无法使用 JMSTemplate 进行配置,因为 JMSTemplate 使用 jakarta.xx 并期望ConnectionFactory来自 jakarta.xx 而不是 javax.xx
编辑:不起作用,所以唯一的方法是升级到 ActiveMQ Artemis。这样代码库也几乎没有变化。
编辑:2023 年 4 月:新的ActiveMQ 客户端发布。您只需要将spring-boot-starter-activemq与更新版本交换并包含此
小智 6
Jakarta JMS 兼容版本 ActiveMQ 5.18.x 已发布。我能够让这个版本在没有 Spring 5.3.x 依赖项的情况下工作:
已删除
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-activemq</artifactId>
</dependency>
Run Code Online (Sandbox Code Playgroud)
并将经纪人包含在新的“jakarta client”依赖项中:
<!-- 5.18 brings initial JMS 2.0 (javax.jms API) and Jakarta Messaging 3.1 (jakarta.jms API) client support -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>5.18.1</version>
<exclusions>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client-jakarta</artifactId>
<version>5.18.1</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
现在,我们再次能够使用服务器上(尚未迁移)未更改的 ActiveMQ 安装来发送和接收消息 - 与 Spring Boot 2.7.x 应用程序和 3.0.5 Spring 应用程序并行。
要继续在 Spring 3 和 Jakarta EE 9 中使用 ActiveMQ 5.x,ActiveMQ 5.x 端需要进行两项更新 - JMS 2.0 支持,然后支持 javax.jms -> jakarta.jms 命名空间更改。
第一部分是最大的部分,正在进行中。ActiveMQ 5.x 主分支提供了对 JMS 2.0 的预览支持,并计划不久后提供 Jakarta 命名空间支持。
这是一个跟踪 ActiveMQ 5.x 中 JMS 2.0 进度的好页面
参考: https: //activemq.apache.org/jms2
更新:Apache ActiveMQ 5.18.1 包括支持 jakarta 的客户端“activemq-client-jakarta”
编辑:通过此更改添加 Spring Boot v3 支持:https://github.com/spring-projects/spring-boot/pull/35048
| 归档时间: |
|
| 查看次数: |
15444 次 |
| 最近记录: |