在Camel中为ActiveMQ代理配置AMQP传输连接器

nef*_*o_x 2 activemq-classic apache-camel amqp

我想要实现的目标是从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>
Run Code Online (Sandbox Code Playgroud)

现在,当我开始骆驼时,我得到以下异常:

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]
Run Code Online (Sandbox Code Playgroud)

Pet*_*der 6

该原型设置了一组ActiveMQ依赖项,以启动最小代理.你还需要包括

<dependency>
  <groupId>org.apache.activemq</groupId>
  <artifactId>activemq-amqp</artifactId>
  <version>5.8.0</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

公开AMQP传输连接器.