AMQP

Available as of Camel X.X

The amqp: component supports the AMQP protocol using the Client API of the Qpid project. In case you want to use AMQP with RabbitMQ you might also be interested in the Camel RabbitMQ component.

Maven users will need to add the following dependency to their pom.xml for this component:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-amqp</artifactId>
    <version>${camel.version}</version> <!-- use the same version as your Camel core version -->
</dependency>

URI format

amqp:[queue:|topic:]destinationName[?options]

AMQP Options

You can specify all of the various configuration options of the JMS component after the destination name.

Using topics

To have using topics working with camel-amqp you need to configure the component to use "topic://" as topic prefix, as shown below

 <bean id="amqpConnection" class="org.apache.camel.component.jms.JmsComponent" >
        <property name="connectionFactory">
          <bean class="org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl" factory-method="createFromURL">
                        <constructor-arg index="0" type="java.lang.String" value="amqp://localhost:5672" />
            <property name="topicPrefix" value="topic://" />  <!-- only necessary when connecting to ActiveMQ over AMQP 1.0 -->
           </bean>
        </property>
    </bean>

 

 

See Also

© 2004-2015 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram