4.9.4. 迁移消息传递拦截器


JBoss EAP 7 中的消息传递拦截器已发生了重大变化,将 HornetQ 替换为 JMS 消息传递提供程序 ActiveMQ Artemis。

之前的 JBoss EAP 版本中包含的 HornetQ 消息传递 子系统要求您安装 HornetQ 拦截器,方法是将它们添加到 JAR 中,然后修改 HornetQ 模块.xml 文件。

JBoss EAP 7 中包含的 messaging-activemq 子系统不需要修改 module.xml 文件。用户拦截器类现在实施 Apache ActiveMQ Artemis Interceptor 接口,现在可以从任何服务器模块加载。您可以指定拦截器应从中加载到服务器配置文件的 messaging-activemq 子系统中的模块。

示例:拦截器配置

<subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0">
  <server name="default">
    ...
    <incoming-interceptors>
      <class name="com.mycompany.incoming.myInterceptor" module="com.mycompany" />
      <class name="com.othercompany.incoming.myOtherInterceptor" module="com.othercompany" />
    </incoming-interceptors>
    <outgoing-interceptors>
      <class name="com.mycompany.outgoing.myInterceptor" module="com.mycompany" />
      <class name="com.othercompany.outgoing.myOtherInterceptor" module="com.othercompany" />
    </outgoing-interceptors>
  </server>
</subsystem>

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部