AMQPThe amqp: component supports the AMQP 1.0 protocol using the JMS Client API of the Qpid project. In case you want to use AMQP 0.9 (in particular RabbitMQ) you might also be interested in the Camel RabbitMQ component. Please keep in mind that prior to the Camel 2.17.0 AMQP component supported AMQP 0.9 and above, however since Camel 2.17.0 it supports only AMQP 1.0. Maven users will need to add the following dependency to their URI formatAMQP OptionsYou can specify all of the various configuration options of the JMS component after the destination name. UsageAs AMQP component is inherited from JMS component, the usage of the former is almost identical to the latter: Using AMQP component Configuring AMQP componentStarting from the Camel 2.16.1 you can also use the Creating AMQP 1.0 component Keep in mind that starting from the Camel 2.17 the Creating AMQP 1.0 component Starting from Camel 2.17, in order to automatically configure the AMQP component, you can also add an instance of AMQP connection details auto-configuration
You can also rely on the Camel properties to read the AMQP connection details. Factory method
AMQP connection details auto-configuration Configuring Connection FactoryLike with any other JMS-based component, usually it's important to configure JMS connection factory. For example, you'd like to set your broker url or set proper connection credentials. Additionally, you would always want to set some kind of pooling (or caching) on the connection factory. An example of how to do both of these tasks is shown below. Using inside KarafIf you want to use amqp component inside the Karaf, there's already defined feature that will install all necessary bundles for you. All you need to do is and the environment would be set. Additionally you can add camel-blueprint or camel-spring features if you want to define your routes in those contexts.
See Also
|