Este contenido no está disponible en el idioma seleccionado.
Chapter 1. AMQP
Messaging with AMQP protocol using Apache QPid Client.
1.1. What’s inside Copiar enlaceEnlace copiado en el portapapeles!
-
AMQP component, URI syntax:
amqp:destinationType:destinationName
Please refer to the above link for usage and configuration details.
1.2. Maven coordinates Copiar enlaceEnlace copiado en el portapapeles!
Create a new project with this extension on code.quarkus.redhat.com
Or add the coordinates to your existing project:
<dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-amqp</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-amqp</artifactId>
</dependency>
1.3. Usage Copiar enlaceEnlace copiado en el portapapeles!
1.3.1. Message mapping with org.w3c.dom.Node Copiar enlaceEnlace copiado en el portapapeles!
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.
1.3.2. Native mode support for javax.jms.ObjectMessage Copiar enlaceEnlace copiado en el portapapeles!
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 native mode user guide for more information.
1.4. Camel Quarkus limitations Copiar enlaceEnlace copiado en el portapapeles!
1.4.1. Connection Pooling Copiar enlaceEnlace copiado en el portapapeles!
JMS connection pooling isn’t supported yet since there is still an open issue with quarkus-qpid-jms.
1.5. transferException option in native mode Copiar enlaceEnlace copiado en el portapapeles!
To use the transferException
option in native mode, you must enable support for object serialization. Refer to the 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.
@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
1.6. Additional Camel Quarkus configuration Copiar enlaceEnlace copiado en el portapapeles!
The extension leverages the 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 configuration options.