我要实现的目标是从 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]