// Do not edit directly!
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
= AMQP
:page-aliases: extensions/amqp.adoc
:linkattrs:
:cq-artifact-id: camel-quarkus-amqp
:cq-native-supported: true
:cq-status: Stable
:cq-status-deprecation: Stable
:cq-description: Messaging with AMQP protocol using Apache QPid Client.
:cq-deprecated: false
:cq-jvm-since: 1.0.0
:cq-native-since: 1.0.0

[.badges]
[.badge-key]##JVM since##[.badge-supported]##1.0.0## [.badge-key]##Native since##[.badge-supported]##1.0.0##

Messaging with AMQP protocol using Apache QPid Client.

== What's inside

* xref:{cq-camel-components}::amqp-component.adoc[AMQP component], URI syntax: `amqp:destinationType:destinationName`

Please refer to the above link for usage and configuration details.

== Maven coordinates

https://code.quarkus.io/?extension-search=camel-quarkus-amqp[Create a new project with this extension on code.quarkus.io, window="_blank"]

Or add the coordinates to your existing project:

[source,xml]
----
<dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-amqp</artifactId>
</dependency>
----

Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.

== Usage

=== Message mapping with `org.w3c.dom.Node`

The Camel AMQP component supports message mapping between `javax.jms.Message` and `org.apache.camel.Message`. When wanting to convert a Camel message body type of `org.w3c.dom.Node`,
you must ensure that the `camel-quarkus-jaxp` extension is present on the classpath.

=== Native mode support for javax.jms.ObjectMessage

When sending JMS message payloads as `javax.jms.ObjectMessage`, you must annotate the relevant classes to be registered for serialization with `@RegisterForReflection(serialization = true)`. 
Note that this extension automatically sets `quarkus.camel.native.reflection.serialization-enabled = true` for you. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide] for more information.


== transferException option in native mode

To use the `transferException` option in native mode, you must enable support for object serialization. Refer to the xref:user-guide/native-mode.adoc#serialization[native mode user guide]
for more information.

You will also need to enable serialization for the exception classes that you intend to serialize. For example.
[source,java]
----
@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
----

== Additional Camel Quarkus configuration

The extension leverages the https://github.com/amqphub/quarkus-qpid-jms/[Quarkus Qpid JMS] extension. A ConnectionFactory bean is automatically created
and wired into the AMQP component for you. The connection factory can be configured
via the Quarkus Qpid JMS https://github.com/amqphub/quarkus-qpid-jms#configuration[configuration options].

