2

Goal i'm trying to achieve is to start AMQP protocol listening from Apache Camel's ActiveMQ broker.

I've did create maven module from org.apache.camel.archetypes:camel-archetype-activemq (Creates a new Camel project that configures and interacts with ActiveMQ.) archetype, did mvn camel:run and it succeeded. Then after i've did a change for amqp protocol:

<!-- 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>

Now when i start camel i get following exception:

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]
nefo_x
  • 3,050
  • 4
  • 27
  • 40

1 Answers1

6

That archetype sets up a base set of ActiveMQ dependencies to kick start a minimal broker. You also need to include

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

to expose AMQP transport connectors.

Petter Nordlander
  • 22,053
  • 5
  • 50
  • 84