1

我正在尝试将 AQ 中的消息提取到 ActiveMq 中的主题中。我按照以下说明操作: http: //activemq.apache.org/jms-bridge-with-oracle-aq.html。但是当我启动 ActiveMQ 时,我得到了这个错误:

2015-09-02 12:33:18,269 | WARN  | Setup of JMS message listener invoker failed for destination 'event_queue' - trying to recover. Cause: JMS-137:  Payload factory must be specified for destinations with ADT payloads | org.apache.camel.component.jms.DefaultJmsMessageListenerContainer | Camel (camel) thread #1 - JmsConsumer[event_queue]

此错误的原因是什么以及如何解决?

4

1 回答 1

1

是的,我找到了解决方案。所以,首先 AQ 支持以下类型的消息:

  • • RAW 队列 • Oracle 对象 (ADT) 类型队列 • Java 消息服务 (JMS) 类型队列/主题

此错误(JMS 137)的原因是 ADT 有效负载不适用于 ActiveMq。如果您打算在 ActiveMq 和 Oracle AQ 之间架起一座桥梁,您应该使用 JMS 类型。另一件事是我找不到所需的 aqjms.jar,我将其替换为 Oracle 客户端 jlib 目录中的 aqapi.jar。bean标签属性也应该是:

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
   http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
于 2015-09-03T09:29:36.717 回答