2

我要实现的目标是从 Apache Camel 的 ActiveMQ 代理启动 AMQP 协议侦听。

我确实从org.apache.camel.archetypes:camel-archetype-activemq (Creates a new Camel project that configures and interacts with ActiveMQ.)原型创建了 Maven 模块,mvn camel:run并且成功了。然后在我对 amqp 协议进行了更改之后:

<!-- This creates an embedded ActiveMQ Broker -->
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" persistent="false">
  <transportConnectors>
    <transportConnector name="default" uri="tcp://localhost:61616" />
    <transportConnector name="amqp+nio" uri="amqp+nio://localhost:5672"/>
  </transportConnectors>
</broker>

现在,当我启动骆驼时,我得到以下异常:

Listening for connections at: tcp://localhost:61616
Connector default Started
ERROR Failed to start Apache ActiveMQ. Reason: java.io.IOException: 
   Transport Connector could not be registered in JMX: 
       Transport scheme NOT recognized: [amqp+nio]
4

1 回答 1

6

该原型设置了一组基本的 ActiveMQ 依赖项来启动最小代理。您还需要包括

<dependency>
  <groupId>org.apache.activemq</groupId>
  <artifactId>activemq-amqp</artifactId>
  <version>5.8.0</version>
</dependency>

公开 AMQP 传输连接器。

于 2013-07-13T22:40:22.930 回答