此内容没有您所选择的语言版本。
Chapter 2. Extensions reference
This chapter provides reference information about Red Hat build of Apache Camel for Quarkus.
2.1. AMQP 复制链接链接已复制到粘贴板!
Messaging with AMQP protocol using Apache QPid Client.
2.1.1. What’s inside 复制链接链接已复制到粘贴板!
-
AMQP component, URI syntax:
amqp:destinationType:destinationName
Refer to the above link for usage and configuration details.
2.1.2. Maven coordinates 复制链接链接已复制到粘贴板!
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>
2.1.3. Usage 复制链接链接已复制到粘贴板!
2.1.3.1. Message mapping with org.w3c.dom.Node 复制链接链接已复制到粘贴板!
The Camel AMQP component supports message mapping between jakarta.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-xml-jaxp
extension is present on the classpath.
When sending JMS message payloads as jakarta.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.
2.1.3.3. Connection Pooling 复制链接链接已复制到粘贴板!
You can use the quarkus-pooled-jms
extension to get pooling support for the connections. Refer to the quarkus-pooled-jms extension documentation for more information.
Just add the following dependency to your pom.xml
:
<dependency> <groupId>io.quarkiverse.messaginghub</groupId> <artifactId>quarkus-pooled-jms</artifactId> </dependency>
<dependency>
<groupId>io.quarkiverse.messaginghub</groupId>
<artifactId>quarkus-pooled-jms</artifactId>
</dependency>
To enable the pooling support, you need to add the following configuration to your application.properties
:
quarkus.qpid-jms.wrap=true
quarkus.qpid-jms.wrap=true
2.1.4. transferException option in native mode 复制链接链接已复制到粘贴板!
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)
2.1.5. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
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.
2.2. Attachments 复制链接链接已复制到粘贴板!
Support for attachments on Camel messages
2.2.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.2.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-attachments</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-attachments</artifactId>
</dependency>
2.3. Avro 复制链接链接已复制到粘贴板!
Serialize and deserialize messages using Apache Avro binary data format.
2.3.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.3.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-avro</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-avro</artifactId>
</dependency>
2.3.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Beyond standard usages known from vanilla Camel, Camel Quarkus adds the possibility to parse the Avro schema at build time both in JVM and Native mode.
The approach to generate Avro classes from Avro schema files is the one coined by the quarkus-avro
extension. It requires the following:
-
Store
*.avsc
files in a folder namedsrc/main/avro
orsrc/test/avro
In addition to the usual
build
goal ofquarkus-maven-plugin
, add thegenerate-code
goal:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Please see a working configuration in Camel Quarkus Avro integration test and Quarkus Avro integration test.
2.4. AWS 2 CloudWatch 复制链接链接已复制到粘贴板!
Sending metrics to AWS CloudWatch.
2.4.1. What’s inside 复制链接链接已复制到粘贴板!
-
AWS CloudWatch component, URI syntax:
aws2-cw:namespace
Refer to the above link for usage and configuration details.
2.4.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-aws2-cw</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-cw</artifactId>
</dependency>
2.4.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.5. AWS 2 DynamoDB 复制链接链接已复制到粘贴板!
Store and retrieve data from AWS DynamoDB service or receive messages from AWS DynamoDB Stream.
2.5.1. What’s inside 复制链接链接已复制到粘贴板!
-
AWS DynamoDB component, URI syntax:
aws2-ddb:tableName
-
AWS DynamoDB Streams component, URI syntax:
aws2-ddbstream:tableName
Refer to the above links for usage and configuration details.
2.5.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-aws2-ddb</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-ddb</artifactId>
</dependency>
2.5.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.5.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
If desired, it is possible to use the Quarkus Amazon DynamoDB extension in conjunction with Camel Quarkus AWS 2 DynamoDB. Note that this is fully optional and not mandatory at all. Please follow the Quarkus documentation but beware of the following caveats:
The client type
apache
has to be selected by configuring the following property:quarkus.dynamodb.sync-client.type=apache
quarkus.dynamodb.sync-client.type=apache
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
DynamoDbClient
has to be made "unremovable" in the sense of Quarkus CDI reference so that Camel Quarkus is able to look it up at runtime. You can reach that e.g. by adding a dummy bean injectingDynamoDbClient
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.6. AWS 2 Kinesis 复制链接链接已复制到粘贴板!
Consume and produce records from AWS Kinesis Streams.
2.6.1. What’s inside 复制链接链接已复制到粘贴板!
-
AWS Kinesis component, URI syntax:
aws2-kinesis:streamName
-
AWS Kinesis Firehose component, URI syntax:
aws2-kinesis-firehose:streamName
Refer to the above links for usage and configuration details.
2.6.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-aws2-kinesis</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-kinesis</artifactId>
</dependency>
2.6.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.7. AWS 2 Lambda 复制链接链接已复制到粘贴板!
Manage and invoke AWS Lambda functions.
2.7.1. What’s inside 复制链接链接已复制到粘贴板!
-
AWS Lambda component, URI syntax:
aws2-lambda:function
Refer to the above link for usage and configuration details.
2.7.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-aws2-lambda</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-lambda</artifactId>
</dependency>
2.7.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.7.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Quarkus-amazon-lambda extension allows you to use Quarkus to build your AWS Lambdas, whereas Camel component manages (deploy, undeploy, …) existing functions. Therefore, it is not possible to use quarkus-amazon-lambda
as a client for Camel aws2-lambda
extension.
2.8. AWS 2 S3 Storage Service 复制链接链接已复制到粘贴板!
Store and retrieve objects from AWS S3 Storage Service.
2.8.1. What’s inside 复制链接链接已复制到粘贴板!
-
AWS S3 Storage Service component, URI syntax:
aws2-s3://bucketNameOrArn
Refer to the above link for usage and configuration details.
2.8.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-aws2-s3</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-s3</artifactId>
</dependency>
2.8.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.8.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.8.4.1. Optional integration with Quarkus Amazon S3 复制链接链接已复制到粘贴板!
If desired, it is possible to use the Quarkus Amazon S3 extension in conjunction with Camel Quarkus AWS 2 S3 Storage Service. Note that this is fully optional and not mandatory at all. Please follow the Quarkus documentation but beware of the following caveats:
The client type
apache
has to be selected by configuring the following property:quarkus.s3.sync-client.type=apache
quarkus.s3.sync-client.type=apache
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
S3Client
has to be made "unremovable" in the sense of Quarkus CDI reference so that Camel Quarkus is able to look it up at runtime. You can reach that e.g. by adding a dummy bean injectingS3Client
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.9. AWS 2 Simple Notification System (SNS) 复制链接链接已复制到粘贴板!
Send messages to an AWS Simple Notification Topic.
2.9.1. What’s inside 复制链接链接已复制到粘贴板!
-
AWS Simple Notification System (SNS) component, URI syntax:
aws2-sns:topicNameOrArn
Refer to the above link for usage and configuration details.
2.9.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-aws2-sns</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-sns</artifactId>
</dependency>
2.9.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.9.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.9.4.1. Optional integration with Quarkus Amazon SNS 复制链接链接已复制到粘贴板!
If desired, it is possible to use the Quarkus Amazon SNS extension in conjunction with Camel Quarkus AWS 2 Simple Notification System (SNS). Note that this is fully optional and not mandatory at all. Please follow the Quarkus documentation but beware of the following caveats:
The client type
apache
has to be selected by configuring the following property:quarkus.sns.sync-client.type=apache
quarkus.sns.sync-client.type=apache
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
SnsClient
has to be made "unremovable" in the sense of Quarkus CDI reference so that Camel Quarkus is able to look it up at runtime. You can reach that e.g. by adding a dummy bean injectingSnsClient
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.10. AWS 2 Simple Queue Service (SQS) 复制链接链接已复制到粘贴板!
Send and receive messages to/from AWS SQS service.
2.10.1. What’s inside 复制链接链接已复制到粘贴板!
-
AWS Simple Queue Service (SQS) component, URI syntax:
aws2-sqs:queueNameOrArn
Refer to the above link for usage and configuration details.
2.10.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-aws2-sqs</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-sqs</artifactId>
</dependency>
2.10.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.10.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.10.4.1. Optional integration with Quarkus Amazon SQS 复制链接链接已复制到粘贴板!
If desired, it is possible to use the Quarkus Amazon SQS extension in conjunction with Camel Quarkus AWS 2 Simple Queue Service (SQS). Note that this is fully optional and not mandatory at all. Please follow the Quarkus documentation but beware of the following caveats:
The client type
apache
has to be selected by configuring the following property:quarkus.sqs.sync-client.type=apache
quarkus.sqs.sync-client.type=apache
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
SqsClient
has to be made "unremovable" in the sense of Quarkus CDI reference so that Camel Quarkus is able to look it up at runtime. You can reach that e.g. by adding a dummy bean injectingSqsClient
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.11. Azure ServiceBus 复制链接链接已复制到粘贴板!
Send and receive messages to/from Azure Service Bus.
2.11.1. What’s inside 复制链接链接已复制到粘贴板!
-
Azure ServiceBus component, URI syntax:
azure-servicebus:topicOrQueueName
Refer to the above link for usage and configuration details.
2.11.2. Maven coordinates 复制链接链接已复制到粘贴板!
<dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-azure-servicebus</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-azure-servicebus</artifactId>
</dependency>
2.12. Azure Storage Blob Service 复制链接链接已复制到粘贴板!
Store and retrieve blobs from Azure Storage Blob Service using SDK v12.
2.12.1. What’s inside 复制链接链接已复制到粘贴板!
-
Azure Storage Blob Service component, URI syntax:
azure-storage-blob:accountName/containerName
Refer to the above link for usage and configuration details.
2.12.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-azure-storage-blob</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-azure-storage-blob</artifactId>
</dependency>
2.12.3. Usage 复制链接链接已复制到粘贴板!
2.12.3.1. Micrometer metrics support 复制链接链接已复制到粘贴板!
If you wish to enable the collection of Micrometer metrics for the Reactor Netty transports, then you should declare a dependency on quarkus-micrometer
to ensure that they are available via the Quarkus metrics HTTP endpoint.
<dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-micrometer</artifactId> </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-micrometer</artifactId>
</dependency>
2.12.4. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.13. Azure Storage Queue Service 复制链接链接已复制到粘贴板!
The azure-storage-queue component is used for storing and retrieving the messages to/from Azure Storage Queue using Azure SDK v12.
2.13.1. What’s inside 复制链接链接已复制到粘贴板!
-
Azure Storage Queue Service component, URI syntax:
azure-storage-queue:accountName/queueName
Refer to the above link for usage and configuration details.
2.13.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-azure-storage-queue</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-azure-storage-queue</artifactId>
</dependency>
2.13.3. Usage 复制链接链接已复制到粘贴板!
2.13.3.1. Micrometer metrics support 复制链接链接已复制到粘贴板!
If you wish to enable the collection of Micrometer metrics for the Reactor Netty transports, then you should declare a dependency on quarkus-micrometer
to ensure that they are available via the Quarkus metrics HTTP endpoint.
<dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-micrometer</artifactId> </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-micrometer</artifactId>
</dependency>
2.13.4. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.14. Bean Validator 复制链接链接已复制到粘贴板!
Validate the message body using the Java Bean Validation API.
2.14.1. What’s inside 复制链接链接已复制到粘贴板!
-
Bean Validator component, URI syntax:
bean-validator:label
Refer to the above link for usage and configuration details.
2.14.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-bean-validator</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-bean-validator</artifactId>
</dependency>
2.14.3. Usage 复制链接链接已复制到粘贴板!
2.14.3.1. Configuring the ValidatorFactory 复制链接链接已复制到粘贴板!
Implementation of this extension leverages the Quarkus Hibernate Validator extension.
Therefore it is not possible to configure the ValidatorFactory
by Camel’s properties (constraintValidatorFactory
, messageInterpolator
, traversableResolver
, validationProviderResolver
and validatorFactory
).
You can configure the ValidatorFactory
by the creation of beans which will be injected into the default ValidatorFactory
(created by Quarkus). See the Quarkus CDI documentation for more information.
2.14.3.2. Custom validation groups in native mode 复制链接链接已复制到粘贴板!
When using custom validation groups in native mode, all the interfaces need to be registered for reflection (see the documentation).
Example:
@RegisterForReflection public interface OptionalChecks { }
@RegisterForReflection
public interface OptionalChecks {
}
2.14.4. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
It is not possible to describe your constraints as XML (by providing the file META-INF/validation.xml), only Java annotations are supported. This is caused by the limitation of the Quarkus Hibernate Validator extension (see the issue).
2.15. Bean 复制链接链接已复制到粘贴板!
Invoke methods of Java beans
2.15.1. What’s inside 复制链接链接已复制到粘贴板!
-
Bean component, URI syntax:
bean:beanName
- Bean Method language
-
Class component, URI syntax:
class:beanName
Refer to the above links for usage and configuration details.
2.15.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-bean</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-bean</artifactId>
</dependency>
2.15.3. Usage 复制链接链接已复制到粘贴板!
Except for invoking methods of beans available in Camel registry, Bean component and Bean method language can also invoke Quarkus CDI beans.
2.16. Bindy 复制链接链接已复制到粘贴板!
Marshal and unmarshal between POJOs on one side and Comma separated values (CSV), fixed field length or key-value pair (KVP) formats on the other side using Camel Bindy
2.16.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above links for usage and configuration details.
2.16.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-bindy</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-bindy</artifactId>
</dependency>
2.16.3. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
When using camel-quarkus-bindy in native mode, only the build machine’s locale is supported.
For instance, on build machines with french locale, the code below:
BindyDataFormat dataFormat = new BindyDataFormat(); dataFormat.setLocale("ar");
BindyDataFormat dataFormat = new BindyDataFormat();
dataFormat.setLocale("ar");
formats numbers the arabic way in JVM mode as expected. However, it formats numbers the french way in native mode.
Without further tuning, the build machine’s default locale would be used. Another locale could be specified with the quarkus.native.user-language and quarkus.native.user-country configuration properties.
2.17. Browse 复制链接链接已复制到粘贴板!
Inspect the messages received on endpoints supporting BrowsableEndpoint.
2.17.1. What’s inside 复制链接链接已复制到粘贴板!
-
Browse component, URI syntax:
browse:name
Refer to the above link for usage and configuration details.
2.17.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-browse</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-browse</artifactId>
</dependency>
2.18. Cassandra CQL 复制链接链接已复制到粘贴板!
Integrate with Cassandra 2.0 using the CQL3 API (not the Thrift API). Based on Cassandra Java Driver provided by DataStax.
2.18.1. What’s inside 复制链接链接已复制到粘贴板!
-
Cassandra CQL component, URI syntax:
cql:beanRef:hosts:port/keyspace
Refer to the above link for usage and configuration details.
2.18.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-cassandraql</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-cassandraql</artifactId>
</dependency>
2.18.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
In order to use Cassandra aggregation repositories like CassandraAggregationRepository
in native mode, you must enable native serialization support.
In addition, if your exchange bodies are custom types, then they must be registered for serialization by annotating their class declaration with @RegisterForReflection(serialization = true)
.
2.19. CLI Connector 复制链接链接已复制到粘贴板!
Runtime adapter connecting with Camel CLI
2.19.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.19.2. Maven coordinates 复制链接链接已复制到粘贴板!
<dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-cli-connector</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-cli-connector</artifactId>
</dependency>
2.20. Control Bus 复制链接链接已复制到粘贴板!
Manage and monitor Camel routes.
2.20.1. What’s inside 复制链接链接已复制到粘贴板!
-
Control Bus component, URI syntax:
controlbus:command:language
Refer to the above link for usage and configuration details.
2.20.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-controlbus</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-controlbus</artifactId>
</dependency>
2.20.3. Usage 复制链接链接已复制到粘贴板!
2.20.3.1. Languages 复制链接链接已复制到粘贴板!
2.20.3.1.1. Bean 复制链接链接已复制到粘贴板!
The Bean language can be used to invoke a method on a bean to control the state of routes. The org.apache.camel.quarkus:camel-quarkus-bean
extension must be added to the classpath. Maven users must add the following dependency to the POM:
<dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-bean</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-bean</artifactId>
</dependency>
In native mode, the bean class must be annotated with @RegisterForReflection
.
2.20.3.1.2. Simple 复制链接链接已复制到粘贴板!
The Simple language can be used to control the state of routes. The following example uses a ProducerTemplate
to stop a route with the id foo
:
template.sendBody( "controlbus:language:simple", "${camelContext.getRouteController().stopRoute('foo')}" );
template.sendBody(
"controlbus:language:simple",
"${camelContext.getRouteController().stopRoute('foo')}"
);
To use the OGNL notation, the org.apache.camel.quarkus:camel-quarkus-bean
extension must be added as a dependency.
In native mode, the classes used in the OGNL notation must be registered for reflection. In the above code snippet, the org.apache.camel.spi.RouteController
class returned from camelContext.getRouteController()
must be registered. As this is a third-party class, it cannot be annotated with @RegisterForReflection
directly - instead you can annotate a different class and specifying the target classes to register. For example, the class defining the Camel routes could be annotated with @RegisterForReflection(targets = { org.apache.camel.spi.RouteController.class })
.
Alternatively, add the following line to your src/main/resources/application.properties
:
quarkus.camel.native.reflection.include-patterns = org.apache.camel.spi.RouteController
quarkus.camel.native.reflection.include-patterns = org.apache.camel.spi.RouteController
2.20.4. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
2.20.4.1. Statistics 复制链接链接已复制到粘贴板!
2.21. Core 复制链接链接已复制到粘贴板!
Camel core functionality and basic Camel languages/ Constant, ExchangeProperty, Header, Ref, Simple and Tokenize
2.21.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above links for usage and configuration details.
2.21.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-core</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core</artifactId>
</dependency>
2.21.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.21.3.1. Simple language 复制链接链接已复制到粘贴板!
2.21.3.1.1. Using the OGNL notation 复制链接链接已复制到粘贴板!
When using the OGNL notation from the simple language, the camel-quarkus-bean
extension should be used.
For instance, the simple expression below is accessing the getAddress()
method on the message body of type Client
.
--- simple("${body.address}") ---
---
simple("${body.address}")
---
In such a situation, one should take an additional dependency on the camel-quarkus-bean extension as described here. Note that in native mode, some classes may need to be registered for reflection. In the example above, the Client
class needs to be registered for reflection.
2.21.3.1.2. Using dynamic type resolution in native mode 复制链接链接已复制到粘贴板!
When dynamically resolving a type from simple expressions like:
-
simple("${mandatoryBodyAs(TYPE)}")
-
simple("${type:package.Enum.CONSTANT}")
-
from("…").split(bodyAs(TYPE.class))
-
simple("${body} is TYPE")
It may be needed to register some classes for reflection manually.
For instance, the simple expression below is dynamically resolving the type java.nio.ByteBuffer
at runtime:
--- simple("${body} is 'java.nio.ByteBuffer'") ---
---
simple("${body} is 'java.nio.ByteBuffer'")
---
As such, the class java.nio.ByteBuffer
needs to be registered for reflection.
If your route is supposed to load a Simple script from classpath, like in the following example
from("direct:start").transform().simple("resource:classpath:mysimple.txt");
from("direct:start").transform().simple("resource:classpath:mysimple.txt");
then you need to use Quarkus quarkus.native.resources.includes
property to include the resource in the native executable as demonstrated below:
quarkus.native.resources.includes = mysimple.txt
quarkus.native.resources.includes = mysimple.txt
When specifying a custom bean via properties in native mode with configuration like #class:*
or #type:*
, it may be needed to register some classes for reflection manually.
For instance, the custom bean definition below involves the use of reflection for bean instantiation and setter invocation:
--- camel.beans.customBeanWithSetterInjection = #class:org.example.PropertiesCustomBeanWithSetterInjection camel.beans.customBeanWithSetterInjection.counter = 123 ---
---
camel.beans.customBeanWithSetterInjection = #class:org.example.PropertiesCustomBeanWithSetterInjection
camel.beans.customBeanWithSetterInjection.counter = 123
---
As such, the class PropertiesCustomBeanWithSetterInjection
needs to be registered for reflection, note that field access could be omitted in this case.
Configuration property | Type | Default |
---|---|---|
When set to true, the |
|
|
A comma-separated list of Ant-path style patterns to match Camel service definition files in the classpath. The services defined in the matching files will not be discoverable via the ** The excludes have higher precedence than includes. The excludes defined here can also be used to veto the discoverability of services included by Camel Quarkus extensions.
Example values: |
| |
A comma-separated list of Ant-path style patterns to match Camel service definition files in the classpath. The services defined in the matching files will be discoverable via the
Note that Camel Quarkus extensions may include some services by default. The services selected here added to those services and the exclusions defined in
Example values: |
| |
A comma-separated list of Ant-path style patterns to match Camel service definition files in the classpath. The services defined in the matching files will not be added to Camel registry during application’s static initialization. The excludes have higher precedence than includes. The excludes defined here can also be used to veto the registration of services included by Camel Quarkus extensions.
Example values: |
| |
A comma-separated list of Ant-path style patterns to match Camel service definition files in the classpath. The services defined in the matching files will be added to Camel registry during application’s static initialization unless the given file is excluded via
Note that Camel Quarkus extensions may include some services by default. The services selected here added to those services and the exclusions defined in
Example values: |
| |
If
Setting this to |
|
|
If
Setting this to |
|
|
If
Setting this to |
|
|
If
Setting this to |
|
|
Enable automatic discovery of routes during static initialization. |
|
|
Used for exclusive filtering scanning of RouteBuilder classes. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: **/Bar* To exclude all routes form a specific package use: com/mycompany/bar/* To exclude all routes form a specific package and its sub-packages use double wildcards: com/mycompany/bar/** And to exclude all routes from two specific packages use: com/mycompany/bar/*,com/mycompany/stuff/* |
| |
Used for inclusive filtering scanning of RouteBuilder classes. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: **/Foo* To include all routes form a specific package use: com/mycompany/foo/* To include all routes form a specific package and its sub-packages use double wildcards: com/mycompany/foo/** And to include all routes from two specific packages use: com/mycompany/foo/*,com/mycompany/stuff/* |
| |
A comma separated list of Ant-path style patterns to match class names that should be excluded from registering for reflection. Use the class name format as returned by the
This option narrows down the set selected by This option cannot be used to unregister classes which have been registered internally by Quarkus extensions. |
| |
A comma separated list of Ant-path style patterns to match class names that should be registered for reflection. Use the class name format as returned by the
By default, no classes are included. The set selected by this option can be narrowed down by Note that Quarkus extensions typically register the required classes for reflection by themselves. This option is useful in situations when the built in functionality is not sufficient.
Note that this option enables the full reflective access for constructors, fields and methods. If you need a finer grained control, consider using For this option to work properly, at least one of the following conditions must be satisfied:
- There are no wildcards (
where |
| |
If |
|
|
What to do if it is not possible to extract expressions from a route definition at build time. |
|
|
Indicates whether the expression extraction from the route definitions at build time must be done. If disabled, the expressions are compiled at runtime. |
|
|
Whether to enable the bridging of Camel events to CDI events.
This allows CDI observers to be configured for Camel events. E.g. those belonging to the Note that this configuration item only has any effect when observers configured for Camel events are present in the application. |
|
|
Build time configuration options for enable/disable camel source location |
|
|
A timeout (with millisecond precision) to wait for |
|
|
The action to take when |
|
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.22. Cron 复制链接链接已复制到粘贴板!
A generic interface for triggering events at times specified through the Unix cron syntax.
2.22.1. What’s inside 复制链接链接已复制到粘贴板!
-
Cron component, URI syntax:
cron:name
Refer to the above link for usage and configuration details.
2.22.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-cron</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-cron</artifactId>
</dependency>
2.22.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
The cron component is a generic interface component, as such Camel Quarkus users will need to use the cron extension together with another extension offering an implementation.
2.23. Crypto (JCE) 复制链接链接已复制到粘贴板!
Sign and verify exchanges using the Signature Service of the Java Cryptographic Extension (JCE).
2.23.1. What’s inside 复制链接链接已复制到粘贴板!
- Crypto (Java Cryptographic Extension) data format
-
Crypto (JCE) component, URI syntax:
crypto:cryptoOperation:name
- PGP data format
Refer to the above links for usage and configuration details.
2.23.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-crypto</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-crypto</artifactId>
</dependency>
2.23.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.24. CXF 复制链接链接已复制到粘贴板!
Expose SOAP WebServices using Apache CXF or connect to external WebServices using CXF WS client.
2.24.1. What’s inside 复制链接链接已复制到粘贴板!
-
CXF component, URI syntax:
cxf:beanId:address
Refer to the above link for usage and configuration details.
2.24.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-cxf-soap</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-cxf-soap</artifactId>
</dependency>
2.24.3. Usage 复制链接链接已复制到粘贴板!
2.24.3.1. General 复制链接链接已复制到粘贴板!
camel-quarkus-cxf-soap
uses extensions from the CXF Extensions for Quarkus project - quarkus-cxf
.
This means the set of supported use cases and WS specifications is largely given by quarkus-cxf
.
To learn about supported use cases and WS specifications, see the Quarkus CXF Reference.
2.24.3.2. Dependency management 复制链接链接已复制到粘贴板!
Red Hat build of Apache Camel for Quarkus manages the CXF and quarkus-cxf
versions. You do not need to select compatible versions for those projects.
2.24.3.3. Client 复制链接链接已复制到粘贴板!
With camel-quarkus-cxf-soap
(no additional dependencies required), you can use CXF clients as producers in Camel routes:
The CalculatorService
may look like the following:
You can test this client application against the quay.io/l2x6/calculator-ws:1.2 container that implements this service endpoint interface:
docker run -p 8082:8080 quay.io/l2x6/calculator-ws:1.2
$ docker run -p 8082:8080 quay.io/l2x6/calculator-ws:1.2
quarkus-cxf
supports injecting SOAP clients using @io.quarkiverse.cxf.annotation.CXFClient
annotation. Refer to the SOAP Clients chapter of quarkus-cxf
user guide for more details.
2.24.3.4. Server 复制链接链接已复制到粘贴板!
With camel-quarkus-cxf-soap
, you can expose SOAP endpoints as consumers in Camel routes. No additional dependencies are required for this use case.
The path under which these two services will be served depends on the value of quarkus.cxf.path
configuration property which can for example be set in application.properties
:
application.properties
quarkus.cxf.path = /soap-services
quarkus.cxf.path = /soap-services
With this configuration in place, our two services can be reached under http://localhost:8080/soap-services/hello-bean
and http://localhost:8080/soap-services/hello-inline
respectively.
The WSDL can be accessed by adding ?wsdl
to the above URLs.
Do not use quarkus.cxf.path = /
in your application unless you are 100% sure that no other extension will want to expose HTTP endpoints.
Before quarkus-cxf
2.0.0 (i.e. before Red Hat build of Apache Camel for Quarkus 3.0.0), the default value of quarkus.cxf.path
was /
. The default was changed because it prevented other Quarkus extensions from exposing any further HTTP endpoints. Among others, RESTEasy, Vert.x, SmallRye Health (no health endpoints exposed!) were impacted by this.
quarkus-cxf
supports alternative ways of exposing SOAP endpoints. Refer to the SOAP Services chapter of quarkus-cxf
user guide for more details.
2.24.3.5. Logging of requests and responses 复制链接链接已复制到粘贴板!
You can enable verbose logging of SOAP messages for both clients and servers with org.apache.cxf.ext.logging.LoggingFeature
:
The support for org.apache.cxf.ext.logging.LoggingFeature
is provided by io.quarkiverse.cxf:quarkus-cxf-rt-features-logging
as a camel-quarkus-cxf-soap
dependency. You do not need to add it explicitly to your application.
2.24.3.6. WS Specifications 复制链接链接已复制到粘贴板!
The extent of supported WS specifications is given by the Quarkus CXF project.
camel-quarkus-cxf-soap
covers only the following specifications via the io.quarkiverse.cxf:quarkus-cxf
extension:
- JAX-WS
- JAXB
- WS-Addressing
- WS-Policy
- MTOM
If your application requires some other WS specification, such as WS-Security or WS-Trust, you must add an additional Quarkus CXF dependency covering it. Refer to Quarkus CXF Reference page to see which WS specifications are covered by which Quarkus CXF extensions.
Both Red Hat build of Apache Camel for Quarkus and Quarkus CXF contain a number of integration tests which can serve as executable examples of applications that implement various WS specifications.
2.24.3.7. Tooling 复制链接链接已复制到粘贴板!
quarkus-cxf
wraps the following two CXF tools:
-
wsdl2Java
- for generating service classes from WSDL -
java2ws
- for generating WSDL from Java classes
For wsdl2Java
to work properly, your application will have to directly depend on io.quarkiverse.cxf:quarkus-cxf
.
While wsdlvalidator
is not supported, you can use wsdl2Java
with the following configuration in application.properties
to validate your WSDLs:
application.properties
quarkus.cxf.codegen.wsdl2java.additional-params = -validate
quarkus.cxf.codegen.wsdl2java.additional-params = -validate
2.25. Data Format 复制链接链接已复制到粘贴板!
Use a Camel Data Format as a regular Camel Component.
For more details of the supported data formats in Red Hat build of Apache Camel for Quarkus, see Supported Data Formats.
2.25.1. What’s inside 复制链接链接已复制到粘贴板!
-
Data Format component, URI syntax:
dataformat:name:operation
Refer to the above link for usage and configuration details.
2.25.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-dataformat</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-dataformat</artifactId>
</dependency>
2.26. Dataset 复制链接链接已复制到粘贴板!
Provide data for load and soak testing of your Camel application.
2.26.1. What’s inside 复制链接链接已复制到粘贴板!
-
Dataset component, URI syntax:
dataset:name
-
DataSet Test component, URI syntax:
dataset-test:name
Refer to the above links for usage and configuration details.
2.26.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-dataset</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-dataset</artifactId>
</dependency>
2.27. Direct 复制链接链接已复制到粘贴板!
Call another endpoint from the same Camel Context synchronously.
2.27.1. What’s inside 复制链接链接已复制到粘贴板!
-
Direct component, URI syntax:
direct:name
Refer to the above link for usage and configuration details.
2.27.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-direct</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-direct</artifactId>
</dependency>
2.28. FHIR 复制链接链接已复制到粘贴板!
Exchange information in the healthcare domain using the FHIR (Fast Healthcare Interoperability Resources) standard. Marshall and unmarshall FHIR objects to/from JSON. Marshall and unmarshall FHIR objects to/from XML.
2.28.1. What’s inside 复制链接链接已复制到粘贴板!
-
FHIR component, URI syntax:
fhir:apiName/methodName
- FHIR JSon data format
- FHIR XML data format
Refer to the above links for usage and configuration details.
2.28.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-fhir</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-fhir</artifactId>
</dependency>
2.28.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.28.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
By default, only FHIR versions R4
& DSTU3
are enabled in native mode, since they are the default values on the FHIR component and DataFormat.
Configuration property | Type | Default |
---|---|---|
Enable FHIR DSTU2 Specs in native mode. |
|
|
Enable FHIR DSTU2_HL7ORG Specs in native mode. |
|
|
Enable FHIR DSTU2_1 Specs in native mode. |
|
|
Enable FHIR DSTU3 Specs in native mode. |
|
|
Enable FHIR R4 Specs in native mode. |
|
|
Enable FHIR R5 Specs in native mode. |
|
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.29. File 复制链接链接已复制到粘贴板!
Read and write files.
2.29.1. What’s inside 复制链接链接已复制到粘贴板!
-
File component, URI syntax:
file:directoryName
Refer to the above link for usage and configuration details.
2.29.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-file</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-file</artifactId>
</dependency>
2.29.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
When the same route is deployed on multiple JVMs, it could be interesting to use this extension in conjunction with the Master one. In such a setup, a single consumer will be active at a time across the whole camel master namespace.
For instance, having the route below deployed on multiple JVMs:
from("master:ns:timer:test?period=100").log("Timer invoked on a single JVM at a time");
from("master:ns:timer:test?period=100").log("Timer invoked on a single JVM at a time");
It’s possible to enable the file cluster service with a property like below:
quarkus.camel.cluster.file.enabled = true quarkus.camel.cluster.file-root = target/cluster-folder-where-lock-file-will-be-held
quarkus.camel.cluster.file.enabled = true
quarkus.camel.cluster.file-root = target/cluster-folder-where-lock-file-will-be-held
As a result, a single consumer will be active across the ns
camel master namespace. It means that, at a given time, only a single timer will generate exchanges across all JVMs. In other words, messages will be logged every 100ms on a single JVM at a time.
The file cluster service could further be tuned by tweaking quarkus.camel.cluster.file.*
properties.
Configuration property | Type | Default |
---|---|---|
Whether a File Lock Cluster Service should be automatically configured according to 'quarkus.camel.cluster.file.*' configurations. |
|
|
The cluster service ID (defaults to null). |
| |
The root path (defaults to null). |
| |
The service lookup order/priority (defaults to 2147482647). |
| |
The time to wait before starting to try to acquire lock (defaults to 1000ms). |
| |
The time to wait between attempts to try to acquire lock (defaults to 10000ms). |
| |
The custom attributes associated to the service (defaults to empty map). |
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.30. FTP 复制链接链接已复制到粘贴板!
Upload and download files to/from SFTP, FTP or SFTP servers
2.30.1. What’s inside 复制链接链接已复制到粘贴板!
-
FTP component, URI syntax:
ftp:host:port/directoryName
-
FTPS component, URI syntax:
ftps:host:port/directoryName
-
SFTP component, URI syntax:
sftp:host:port/directoryName
Refer to the above links for usage and configuration details.
2.30.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-ftp</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-ftp</artifactId>
</dependency>
2.31. Google BigQuery 复制链接链接已复制到粘贴板!
Access Google Cloud BigQuery service using SQL queries or Google Client Services API
2.31.1. What’s inside 复制链接链接已复制到粘贴板!
-
Google BigQuery component, URI syntax:
google-bigquery:projectId:datasetId:tableId
-
Google BigQuery Standard SQL component, URI syntax:
google-bigquery-sql:projectId:queryString
Refer to the above links for usage and configuration details.
2.31.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-google-bigquery</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-google-bigquery</artifactId>
</dependency>
2.31.3. Usage 复制链接链接已复制到粘贴板!
If you want to read SQL scripts from the classpath with google-bigquery-sql
in native mode, then you will need to ensure that they are added to the native image via the quarkus.native.resources.includes
configuration property. Please check Quarkus documentation for more details.
2.32. Google Pubsub 复制链接链接已复制到粘贴板!
Send and receive messages to/from Google Cloud Platform PubSub Service.
2.32.1. What’s inside 复制链接链接已复制到粘贴板!
-
Google Pubsub component, URI syntax:
google-pubsub:projectId:destinationName
Refer to the above link for usage and configuration details.
2.32.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-google-pubsub</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-google-pubsub</artifactId>
</dependency>
2.32.3. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
By default, the Camel PubSub component uses JDK object serialization via ObjectOutputStream
whenever the message body is anything other than String
or byte[]
.
Since such serialization is not yet supported by GraalVM, this extension provides a custom Jackson based serializer to serialize complex message payloads as JSON.
If your payload contains binary data, then you will need to handle that by creating a custom Jackson Serializer / Deserializer. Refer to the Quarkus Jackson guide for information on how to do this.
2.33. gRPC 复制链接链接已复制到粘贴板!
Expose gRPC endpoints and access external gRPC endpoints.
2.33.1. What’s inside 复制链接链接已复制到粘贴板!
-
gRPC component, URI syntax:
grpc:host:port/service
Refer to the above link for usage and configuration details.
2.33.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-grpc</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-grpc</artifactId>
</dependency>
2.33.3. Usage 复制链接链接已复制到粘贴板!
2.33.3.1. Protobuf generated code 复制链接链接已复制到粘贴板!
Camel Quarkus gRPC can generate gRPC service stubs for .proto
files. When using Maven, ensure that you have enabled the generate-code
goals of the quarkus-maven-plugin
in your project build.
With this configuration, you can put your service and message definitions into the src/main/proto
directory and the quarkus-maven-plugin
will generate code from your .proto
files.
2.33.3.1.1. Scanning proto files with imports 复制链接链接已复制到粘贴板!
The Protocol Buffers specification provides a way to import proto files. You can control the scope of dependencies to scan by adding configuration property quarkus.camel.grpc.codegen.scan-for-imports
property to application.properties
. The available options are outlined below.
-
all
- Scan all dependencies -
none
- Disable dependency scanning. Use only the proto definitions defined insrc/main/proto
orsrc/test/proto
-
groupId1:artifactId1,groupId2:artifactId2
- Scan only the dependencies matching thegroupId
andartifactId
list
The default value is com.google.protobuf:protobuf-java
.
2.33.3.1.2. Scanning proto files from dependencies 复制链接链接已复制到粘贴板!
If you have proto files shared across multiple dependencies, you can generate gRPC service stubs for them by adding configuration property quarkus.camel.grpc.codegen.scan-for-proto
to application.properties
.
First add a dependency for the artifact(s) containing proto files to your project. Next, enable proto file dependency scanning.
quarkus.camel.grpc.codegen.scan-for-proto=org.my.groupId1:my-artifact-id-1,org.my.groupId2:my-artifact-id-2
quarkus.camel.grpc.codegen.scan-for-proto=org.my.groupId1:my-artifact-id-1,org.my.groupId2:my-artifact-id-2
It is possible to include / exclude specific proto files from dependency scanning via configuration properties.
The configuration property name suffix is the Maven groupId
/ artifactId
for the dependency to configure includes / excludes on. Paths are relative to the classpath location of the proto files within the dependency. Paths can be an explicit path to a proto file, or as glob patterns to include / exclude multiple files.
quarkus.camel.grpc.codegen.scan-for-proto-includes."<groupId>\:<artifactId>"=foo/**,bar/**,baz/a-proto.proto quarkus.camel.grpc.codegen.scan-for-proto-excludes."<groupId>\:<artifactId>"=foo/private/**,baz/another-proto.proto
quarkus.camel.grpc.codegen.scan-for-proto-includes."<groupId>\:<artifactId>"=foo/**,bar/**,baz/a-proto.proto
quarkus.camel.grpc.codegen.scan-for-proto-excludes."<groupId>\:<artifactId>"=foo/private/**,baz/another-proto.proto
The :
character within property keys must be escaped with \
.
2.33.3.2. Accessing classpath resources in native mode 复制链接链接已复制到粘贴板!
The gRPC component has various options where resources are resolved from the classpath:
-
keyCertChainResource
-
keyResource
-
serviceAccountResource
-
trustCertCollectionResource
When using these options in native mode, you must ensure that any such resources are included in the native image.
This can be accomplished by adding the configuration property quarkus.native.resources.includes
to application.properties
. For example, to include SSL / TLS keys and certificates.
quarkus.native.resources.includes = certs/*.pem,certs.*.key
quarkus.native.resources.includes = certs/*.pem,certs.*.key
2.33.4. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
2.33.4.1. Integration with Quarkus gRPC is not supported 复制链接链接已复制到粘贴板!
At present there is no support for integrating Camel Quarkus gRPC with Quarkus gRPC. If you have both the camel-quarkus-grpc
and quarkus-grpc
extension dependency on the classpath, you are likely to encounter problems at build time when compiling your application.
2.33.5. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Configuration property | Type | Default |
---|---|---|
If |
|
|
Camel Quarkus gRPC code generation can scan application dependencies for .proto files to generate Java stubs from them. This property sets the scope of the dependencies to scan. Applicable values: - none - default - don’t scan dependencies - a comma separated list of groupId:artifactId coordinates to scan - all - scan all dependencies |
|
|
Camel Quarkus gRPC code generation can scan dependencies for .proto files that can be imported by protos in this applications. Applicable values: - none - default - don’t scan dependencies - a comma separated list of groupId:artifactId coordinates to scan - all - scan all dependencies The default is com.google.protobuf:protobuf-java. |
|
|
Package path or file glob pattern includes per dependency containing .proto files to be considered for inclusion. |
| |
Package path or file glob pattern includes per dependency containing .proto files to be considered for exclusion. |
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.34. Gson 复制链接链接已复制到粘贴板!
Marshal POJOs to JSON and back using Gson
2.34.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.34.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-gson</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-gson</artifactId>
</dependency>
2.34.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.34.3.1. Marshaling/Unmarshaling objects in native mode 复制链接链接已复制到粘贴板!
When marshaling/unmarshaling objects in native mode, all the serialized classes need to be registered for reflection. As such, when using GsonDataFormat.setUnmarshalType(…)
, GsonDataFormat.setUnmarshalTypeName(…)
and even GsonDataFormat.setUnmarshalGenericType(…)
, the unmarshal type as well as sub field types should be registered for reflection. See a working example in this integration test.
2.35. HL7 复制链接链接已复制到粘贴板!
Marshal and unmarshal HL7 (Health Care) model objects using the HL7 MLLP codec.
2.35.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above links for usage and configuration details.
2.35.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-hl7</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-hl7</artifactId>
</dependency>
2.35.3. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
For MLLP with TCP, Netty is the only supported means of running an Hl7 MLLP listener. Mina is not supported since it has no GraalVM native support at present.
Optional support for HL7MLLPNettyEncoderFactory
& HL7MLLPNettyDecoderFactory
codecs can be obtained by adding a dependency in your project pom.xml
to camel-quarkus-netty
.
2.36. HTTP 复制链接链接已复制到粘贴板!
Send requests to external HTTP servers using Apache HTTP Client 5.x.
2.36.1. What’s inside 复制链接链接已复制到粘贴板!
-
HTTP component, URI syntax:
http://httpUri
-
HTTPS (Secure) component, URI syntax:
https://httpUri
Refer to the above links for usage and configuration details.
2.36.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-http</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-http</artifactId>
</dependency>
2.36.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.36.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
- Check the Character encodings section of the Native mode guide if you expect your application to send or receive requests using non-default encodings.
2.37. Infinispan 复制链接链接已复制到粘贴板!
Read and write from/to Infinispan distributed key/value store and data grid.
2.37.1. What’s inside 复制链接链接已复制到粘贴板!
-
Infinispan component, URI syntax:
infinispan:cacheName
Refer to the above link for usage and configuration details.
2.37.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-infinispan</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-infinispan</artifactId>
</dependency>
2.37.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.37.3.1. Infinispan Client Configuration 复制链接链接已复制到粘贴板!
You can either configure the Infinispan client via the relevant Camel Infinispan component & endpoint options, or you may use the Quarkus Infinispan extension configuration properties.
Note that if you choose to use Quarkus Infinispan configuration properties, you must add an injection point for the RemoteCacheManager
in order for it to be discoverable by the Camel Infinispan component. For example:
If you chose to use the InfinispanRemoteAggregationRepository
in native mode, then you must enable native serialization support.
2.38. Avro Jackson 复制链接链接已复制到粘贴板!
Marshal POJOs to Avro and back using Jackson.
2.38.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.38.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jackson-avro</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jackson-avro</artifactId>
</dependency>
2.39. Protobuf Jackson 复制链接链接已复制到粘贴板!
Marshal POJOs to Protobuf and back using Jackson.
2.39.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.39.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jackson-protobuf</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jackson-protobuf</artifactId>
</dependency>
2.40. Jackson 复制链接链接已复制到粘贴板!
Marshal POJOs to JSON and back using Jackson
2.40.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.40.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jackson</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jackson</artifactId>
</dependency>
2.40.3. Usage 复制链接链接已复制到粘贴板!
2.40.3.1. Configuring the Jackson ObjectMapper 复制链接链接已复制到粘贴板!
There are a few ways of configuring the ObjectMapper
that the JacksonDataFormat
uses. These are outlined below.
By default, JacksonDataFormat
will create its own ObjectMapper
and use the various configuration options on the DataFormat
to configure additional Jackson modules, pretty printing and other features.
2.40.3.1.2. Custom ObjectMapper for JacksonDataFormat 复制链接链接已复制到粘贴板!
You can pass a custom ObjectMapper
instance to JacksonDataFormat
as follows.
The Quarkus Jackson extension exposes an ObjectMapper
CDI bean which can be discovered by the JacksonDataFormat
.
If you are using the JSON binding mode in the Camel REST DSL and want to use the Quarkus Jackson ObjectMapper
, it can be achieved as follows.
You can perform customizations on the Quarkus ObjectMapper
with a ObjectMapperCustomizer
.
It’s also possible to @Inject
the Quarkus ObjectMapper
and pass it to the JacksonDataFormat
.
2.41. JacksonXML 复制链接链接已复制到粘贴板!
Unmarshal an XML payloads to POJOs and back using XMLMapper extension of Jackson.
2.41.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.41.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jacksonxml</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jacksonxml</artifactId>
</dependency>
2.42. Java jOOR DSL 复制链接链接已复制到粘贴板!
Support for parsing Java route definitions at runtime
2.42.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.42.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-java-joor-dsl</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-java-joor-dsl</artifactId>
</dependency>
2.42.3. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
The annotations added to the classes to be compiled by the component are ignored by Quarkus. The only annotation that is partially supported by the extension is the annotation RegisterForReflection
to ease the configuration of the reflection for the native mode however please note that the element registerFullHierarchy
is not supported.
2.43. JAXB 复制链接链接已复制到粘贴板!
Unmarshal XML payloads to POJOs and back using JAXB2 XML marshalling standard.
2.43.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.43.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jaxb</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jaxb</artifactId>
</dependency>
2.43.3. Usage 复制链接链接已复制到粘贴板!
When performing JAXB marshal operations with a custom ObjectFactory
to instantiate POJO classes that do not have JAXB annotations, you must register those POJO classes for reflection in order for them to be instantiated in native mode. E.g via the @RegisterForReflection
annotation or configuration property quarkus.camel.native.reflection.include-patterns
.
Refer to the Native mode user guide for more information.
2.44. JDBC 复制链接链接已复制到粘贴板!
Access databases through SQL and JDBC.
2.44.1. What’s inside 复制链接链接已复制到粘贴板!
-
JDBC component, URI syntax:
jdbc:dataSourceName
Refer to the above link for usage and configuration details.
2.44.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jdbc</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jdbc</artifactId>
</dependency>
2.44.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.44.3.1. Configuring a DataSource 复制链接链接已复制到粘贴板!
This extension leverages Quarkus Agroal for DataSource
support. Setting up a DataSource
can be achieved via configuration properties. It is recommended that you explicitly name the datasource so that it can be referenced in the JDBC endpoint URI. E.g like to("jdbc:camel")
.
quarkus.datasource.camel.db-kind=postgresql quarkus.datasource.camel.username=your-username quarkus.datasource.camel.password=your-password quarkus.datasource.camel.jdbc.url=jdbc:postgresql://localhost:5432/your-database quarkus.datasource.camel.jdbc.max-size=16
quarkus.datasource.camel.db-kind=postgresql
quarkus.datasource.camel.username=your-username
quarkus.datasource.camel.password=your-password
quarkus.datasource.camel.jdbc.url=jdbc:postgresql://localhost:5432/your-database
quarkus.datasource.camel.jdbc.max-size=16
If you choose to not name the datasource, you can resolve the default DataSource
by defining your endpoint like to("jdbc:default")
.
2.44.3.1.1. Zero configuration with Quarkus Dev Services 复制链接链接已复制到粘贴板!
In dev and test mode you can take advantage of Configuration Free Databases. All you need to do is reference the default database in your routes. E.g to("jdbc:default")
.
2.45. Jira 复制链接链接已复制到粘贴板!
Interact with JIRA issue tracker.
2.45.1. What’s inside 复制链接链接已复制到粘贴板!
-
Jira component, URI syntax:
jira:type
Refer to the above link for usage and configuration details.
2.45.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jira</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jira</artifactId>
</dependency>
2.45.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.46. JMS 复制链接链接已复制到粘贴板!
Sent and receive messages to/from a JMS Queue or Topic.
2.46.1. What’s inside 复制链接链接已复制到粘贴板!
-
JMS component, URI syntax:
jms:destinationType:destinationName
Refer to the above link for usage and configuration details.
2.46.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jms</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jms</artifactId>
</dependency>
2.46.3. Usage 复制链接链接已复制到粘贴板!
2.46.3.1. Message mapping with org.w3c.dom.Node 复制链接链接已复制到粘贴板!
The Camel JMS component supports message mapping between jakarta.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-xml-jaxp
extension is present on the classpath.
When sending JMS message payloads as jakarta.jms.ObjectMessage
, you must annotate the relevant classes to be registered for serialization with @RegisterForReflection(serialization = true)
.
This extension automatically sets quarkus.camel.native.reflection.serialization-enabled = true
for you. Refer to the native mode user guide for more information.
You can use the quarkus-pooled-jms
extension to get pooling and XA support for JMS connections. Refer to the quarkus-pooled-jms extension documentation for more information. Currently, it can work with quarkus-artemis-jms
, quarkus-qpid-jms
and ibmmq-client
. Just add the dependency to your pom.xml
:
<dependency> <groupId>io.quarkiverse.messaginghub</groupId> <artifactId>quarkus-pooled-jms</artifactId> </dependency>
<dependency>
<groupId>io.quarkiverse.messaginghub</groupId>
<artifactId>quarkus-pooled-jms</artifactId>
</dependency>
Pooling is enabled by default.
clientID
and durableSubscriptionName
are not supported in pooling connections. If setClientID
is called on a reused
connection from the pool, an IllegalStateException
will be thrown. You will get some error messages such like Cause: setClientID can only be called directly after the connection is created
To enable XA, you need to add quarkus-narayana-jta
extension:
<dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-narayana-jta</artifactId> </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-narayana-jta</artifactId>
</dependency>
and add the following configuration to your application.properties
:
quarkus.pooled-jms.transaction=xa quarkus.transaction-manager.enable-recovery=true
quarkus.pooled-jms.transaction=xa
quarkus.transaction-manager.enable-recovery=true
XA support is only available with quarkus-artemis-jms
and ibmmq-client
.
We strongly recommend that you enable transaction recovery.
Since there currently exists no quarkus extension for ibmmq-client
, you need to create a custom ConnectionFactory
and wrap it yourself.
Here is an example:
Wrapper example: ConnectionFactory
for ibmmq-client
2.47. JPA 复制链接链接已复制到粘贴板!
Store and retrieve Java objects from databases using Java Persistence API (JPA).
2.47.1. What’s inside 复制链接链接已复制到粘贴板!
-
JPA component, URI syntax:
jpa:entityType
Refer to the above link for usage and configuration details.
2.47.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jpa</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jpa</artifactId>
</dependency>
2.47.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
The extension leverages Quarkus Hibernate ORM to provide the JPA implementation via Hibernate.
Refer to the Quarkus Hibernate ORM documentation to see how to configure Hibernate and your datasource.
Also, it leverages Quarkus TX API to provide TransactionStrategy
implementation.
When a single persistence unit is used, the Camel Quarkus JPA extension will automatically configure the JPA component with a EntityManagerFactory
and TransactionStrategy
.
2.47.3.1. Configuring JpaMessageIdRepository 复制链接链接已复制到粘贴板!
It needs to use EntityManagerFactory
and TransactionStrategy
from the CDI container to configure the JpaMessageIdRepository
:
Since it excludes the spring-orm
dependency, some options such as sharedEntityManager
, transactionManager
are not supported.
2.48. JSLT 复制链接链接已复制到粘贴板!
Query or transform JSON payloads using an JSLT.
2.48.1. What’s inside 复制链接链接已复制到粘贴板!
-
JSLT component, URI syntax:
jslt:resourceUri
Refer to the above link for usage and configuration details.
2.48.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jslt</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jslt</artifactId>
</dependency>
2.48.3. allowContextMapAll option in native mode 复制链接链接已复制到粘贴板!
The allowContextMapAll
option is not supported in native mode as it requires reflective access to security sensitive camel core classes such as CamelContext
& Exchange
. This is considered a security risk and thus access to the feature is not provided by default.
2.48.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
This component typically loads the templates from classpath. To make it work also in native mode, you need to explicitly embed the templates files in the native executable by using the quarkus.native.resources.includes
property.
For instance, the route below would load the JSLT schema from a classpath resource named transformation.json
:
from("direct:start").to("jslt:transformation.json");
from("direct:start").to("jslt:transformation.json");
To include this (an possibly other templates stored in .json
files) in the native image, you would have to add something like the following to your application.properties
file:
quarkus.native.resources.includes = *.json
quarkus.native.resources.includes = *.json
2.48.4.2. Using JSLT functions in native mode 复制链接链接已复制到粘贴板!
When using JSLT functions from camel-quarkus in native mode, the classes hosting the functions would need to be registered for reflection. When registering the target function is not possible, one may end up writing a stub as below.
The target function Math.pow(…)
is now accessible through the MathFunctionStub
class that could be registered in the component as below:
2.49. JSON Path 复制链接链接已复制到粘贴板!
Evaluate a JSONPath expression against a JSON message body
2.49.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.49.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jsonpath</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jsonpath</artifactId>
</dependency>
2.50. JTA 复制链接链接已复制到粘贴板!
Enclose Camel routes in transactions using Java Transaction API (JTA) and Narayana transaction manager
2.50.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.50.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-jta</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jta</artifactId>
</dependency>
2.50.3. Usage 复制链接链接已复制到粘贴板!
This extension should be added when you need to use the transacted()
EIP in the router. It leverages the transaction capabilities provided by the narayana-jta extension in Quarkus.
Refer to the Quarkus Transaction guide for the more details about transaction support. For a simple usage:
from("direct:transaction") .transacted() .to("sql:INSERT INTO A TABLE ...?dataSource=ds1") .to("sql:INSERT INTO A TABLE ...?dataSource=ds2") .log("all data are in the ds1 and ds2")
from("direct:transaction")
.transacted()
.to("sql:INSERT INTO A TABLE ...?dataSource=ds1")
.to("sql:INSERT INTO A TABLE ...?dataSource=ds2")
.log("all data are in the ds1 and ds2")
Support is provided for various transaction policies.
Policy | Description |
---|---|
| Support a current transaction; throw an exception if no current transaction exists. |
| Do not support a current transaction; throw an exception if a current transaction exists. |
| Do not support a current transaction; rather always execute non-transactionally. |
| Support a current transaction; create a new one if none exists. |
| Create a new transaction, suspending the current transaction if one exists. |
| Support a current transaction; execute non-transactionally if none exists. |
2.51. Kafka 复制链接链接已复制到粘贴板!
Sent and receive messages to/from an Apache Kafka broker.
2.51.1. What’s inside 复制链接链接已复制到粘贴板!
-
Kafka component, URI syntax:
kafka:topic
Refer to the above link for usage and configuration details.
2.51.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-kafka</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-kafka</artifactId>
</dependency>
2.51.3. Usage 复制链接链接已复制到粘贴板!
2.51.3.1. Quarkus Kafka Dev Services 复制链接链接已复制到粘贴板!
Camel Quarkus Kafka can take advantage of Quarkus Kafka Dev services to simplify development and testing with a local containerized Kafka broker.
Kafka Dev Services is enabled by default in dev & test mode. The Camel Kafka component is automatically configured so that the brokers
component option is set to point at the local containerized Kafka broker. Meaning that there’s no need to configure this option yourself.
This functionality can be disabled with the configuration property quarkus.kafka.devservices.enabled=false
.
2.51.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Configuration property | Type | Default |
---|---|---|
If |
|
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.52. Kamelet 复制链接链接已复制到粘贴板!
Materialize route templates
2.52.1. What’s inside 复制链接链接已复制到粘贴板!
-
Kamelet component, URI syntax:
kamelet:templateId/routeId
Refer to the above link for usage and configuration details.
2.52.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-kamelet</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-kamelet</artifactId>
</dependency>
2.52.3. Usage 复制链接链接已复制到粘贴板!
2.52.3.1. Pre-load Kamelets at build-time 复制链接链接已复制到粘贴板!
This extension allows to pre-load a set of Kamelets at build time using the quarkus.camel.kamelet.identifiers
property.
2.52.3.2. Using the Kamelet Catalog 复制链接链接已复制到粘贴板!
A set of pre-made Kamelets can be found on the /camel-kamelets/latest[Kamelet Catalog]. To use the Kamelet from the catalog you need to copy their yaml definition (that you can find in the camel-kamelet repo) on your project in the classpath. Alternatively you can add the camel-kamelets-catalog
artifact to your pom.xml
:
<dependency> <groupId>org.apache.camel.kamelets</groupId> <artifactId>camel-kamelets-catalog</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.kamelets</groupId>
<artifactId>camel-kamelets-catalog</artifactId>
</dependency>
This artifact add all the kamelets available in the catalog to your Camel Quarkus application for build time processing. If you include it with the scope provided
the artifact should not be part of the runtime classpath, but at build time, all the kamelets listed via quarkus.camel.kamelet.identifiers
property should be preloaded.
2.52.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Configuration property | Type | Default |
---|---|---|
List of kamelets identifiers to pre-load at build time.
Each individual identifier is used to set the related |
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.53. Kubernetes 复制链接链接已复制到粘贴板!
Perform operations against Kubernetes API
2.53.1. Maven coordinates 复制链接链接已复制到粘贴板!
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-kubernetes</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-kubernetes</artifactId>
</dependency>
2.53.2. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
The extension automatically registers a Kubernetes Client bean named kubernetesClient
. You can reference the bean in your routes like this:
from("direct:pods") .to("kubernetes-pods:///?kubernetesClient=#kubernetesClient&operation=listPods")
from("direct:pods")
.to("kubernetes-pods:///?kubernetesClient=#kubernetesClient&operation=listPods")
By default the client is configured from the local kubeconfig file. You can customize the client configuration via properties within application.properties
:
quarkus.kubernetes-client.master-url=https://my.k8s.host quarkus.kubernetes-client.namespace=my-namespace
quarkus.kubernetes-client.master-url=https://my.k8s.host
quarkus.kubernetes-client.namespace=my-namespace
The full set of configuration options are documented in the Quarkus Kubernetes Client guide.
When the same route is deployed on multiple pods, it could be interesting to use this extension in conjunction with the Master one. In such a setup, a single consumer will be active at a time across the whole camel master namespace.
For instance, having the route below deployed on multiple pods:
from("master:ns:timer:test?period=100").log("Timer invoked on a single pod at a time");
from("master:ns:timer:test?period=100").log("Timer invoked on a single pod at a time");
It’s possible to enable the kubernetes cluster service with a property like below:
quarkus.camel.cluster.kubernetes.enabled = true
quarkus.camel.cluster.kubernetes.enabled = true
As a result, a single consumer will be active across the ns
camel master namespace. It means that, at a given time, only a single timer will generate exchanges across the whole cluster. In other words, messages will be logged every 100ms on a single pod at a time.
The kubernetes cluster service could further be tuned by tweaking quarkus.camel.cluster.kubernetes.*
properties.
Configuration property | Type | Default |
---|---|---|
Whether a Kubernetes Cluster Service should be automatically configured according to 'quarkus.camel.cluster.kubernetes.*' configurations. |
|
|
The cluster service ID (defaults to null). |
| |
The URL of the Kubernetes master (read from Kubernetes client properties by default). |
| |
The connection timeout in milliseconds to use when making requests to the Kubernetes API server. |
| |
The name of the Kubernetes namespace containing the pods and the configmap (autodetected by default). |
| |
The name of the current pod (autodetected from container host name by default). |
| |
The jitter factor to apply in order to prevent all pods to call Kubernetes APIs in the same instant (defaults to 1.2). |
| |
The default duration of the lease for the current leader (defaults to 15000). |
| |
The deadline after which the leader must stop its services because it may have lost the leadership (defaults to 10000). |
| |
The time between two subsequent attempts to check and acquire the leadership. It is randomized using the jitter factor (defaults to 2000). |
| |
Service lookup order/priority (defaults to 2147482647). |
| |
The name of the lease resource used to do optimistic locking (defaults to 'leaders'). The resource name is used as prefix when the underlying Kubernetes resource can manage a single lock. |
| |
The lease resource type used in Kubernetes, either 'config-map' or 'lease' (defaults to 'lease'). |
| |
Whether the camel master namespace leaders should be distributed evenly across all the camel contexts in the cluster. |
|
|
The labels key/value used to identify the pods composing the cluster, defaults to empty map. |
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.54. Language 复制链接链接已复制到粘贴板!
Execute scripts in any of the languages supported by Camel.
2.54.1. What’s inside 复制链接链接已复制到粘贴板!
-
Language component, URI syntax:
language:languageName:resourceUri
Refer to the above link for usage and configuration details.
2.54.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-language</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-language</artifactId>
</dependency>
2.54.3. Usage 复制链接链接已复制到粘贴板!
2.54.3.1. Required Dependencies 复制链接链接已复制到粘贴板!
The Language extension only handles the passing of an Exchange to a script for execution. The extension implementing the language must be added as a dependency. The following list of languages are implemented in Core:
- Constant
- ExchangeProperty
- File
- Header
- Ref
- Simple
- Tokenize
To use any other language, you must add the corresponding dependency. Consult the Languages Guide for details.
2.54.3.2. Native Mode 复制链接链接已复制到粘贴板!
When loading scripts from the classpath in native mode, the path to the script file must be specified in the quarkus.native.resources.includes
property of the application.properties
file. For example:
quarkus.native.resources.includes=script.txt
quarkus.native.resources.includes=script.txt
2.54.4. allowContextMapAll option in native mode 复制链接链接已复制到粘贴板!
The allowContextMapAll
option is not supported in native mode as it requires reflective access to security sensitive camel core classes such as CamelContext
& Exchange
. This is considered a security risk and thus access to the feature is not provided by default.
2.55. LDAP 复制链接链接已复制到粘贴板!
Perform searches on LDAP servers.
2.55.1. What’s inside 复制链接链接已复制到粘贴板!
-
LDAP component, URI syntax:
ldap:dirContextName
Refer to the above link for usage and configuration details.
2.55.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-ldap</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-ldap</artifactId>
</dependency>
2.55.3. Usage 复制链接链接已复制到粘贴板!
2.55.3.1. Using SSL in Native Mode 复制链接链接已复制到粘贴板!
When using a custom SSLSocketFactory
in native mode, such as the one in the Configuring SSL section, you need to register the class for reflection otherwise the class will not be made available on the classpath. Add the @RegisterForReflection
annotation above the class definition, as follows:
@RegisterForReflection public class CustomSSLSocketFactory extends SSLSocketFactory { // The class definition is the same as in the above link. }
@RegisterForReflection
public class CustomSSLSocketFactory extends SSLSocketFactory {
// The class definition is the same as in the above link.
}
2.56. Log 复制链接链接已复制到粘贴板!
Log messages to the underlying logging mechanism.
2.56.1. What’s inside 复制链接链接已复制到粘贴板!
-
Log component, URI syntax:
log:loggerName
Refer to the above link for usage and configuration details.
2.56.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-log</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-log</artifactId>
</dependency>
2.57. Mail 复制链接链接已复制到粘贴板!
Send and receive emails using imap, pop3 and smtp protocols. Marshal Camel messages with attachments into MIME-Multipart messages and back.
2.57.1. What’s inside 复制链接链接已复制到粘贴板!
-
IMAP component, URI syntax:
imap:host:port
-
IMAPS (Secure) component, URI syntax:
imaps:host:port
- MIME Multipart data format
-
POP3 component, URI syntax:
pop3:host:port
-
POP3S component, URI syntax:
pop3s:host:port
-
SMTP component, URI syntax:
smtp:host:port
-
SMTPS component, URI syntax:
smtps:host:port
Refer to the above links for usage and configuration details.
2.57.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-mail</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mail</artifactId>
</dependency>
2.58. Management 复制链接链接已复制到粘贴板!
JMX management strategy and associated managed resources.
2.58.1. Maven coordinates 复制链接链接已复制到粘贴板!
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-management</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-management</artifactId>
</dependency>
2.58.2. Usage 复制链接链接已复制到粘贴板!
For information on using Managed Beans in Camel, consult the JMX section of the Camel Manual.
2.58.2.1. Enabling and Disabling JMX 复制链接链接已复制到粘贴板!
JMX can be enabled or disabled in Camel-Quarkus by any of the following methods:
-
Adding or removing the
camel-quarkus-management
extension. -
Setting the
camel.main.jmxEnabled
configuration property to a boolean value. -
Setting the system property
-Dorg.apache.camel.jmx.disabled
to a boolean value.
2.58.2.2. Native mode 复制链接链接已复制到粘贴板!
Experimental JMX support was added for native executables in GraalVM for JDK 17/20 / Mandrel 23.0. You can enable this feature by adding the following configuration property to application.properties
.
quarkus.native.monitoring=jmxserver
quarkus.native.monitoring=jmxserver
For more information, refer to the Quarkus native guide.
2.59. MapStruct 复制链接链接已复制到粘贴板!
Type Conversion using Mapstruct
2.59.1. What’s inside 复制链接链接已复制到粘贴板!
-
MapStruct component, URI syntax:
mapstruct:className
Refer to the above link for usage and configuration details.
2.59.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-mapstruct</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mapstruct</artifactId>
</dependency>
2.59.3. Usage 复制链接链接已复制到粘贴板!
2.59.3.1. Annotation Processor 复制链接链接已复制到粘贴板!
To use MapStruct, you must configure your build to use an annotation processor.
2.59.3.1.1. Maven 复制链接链接已复制到粘贴板!
2.59.3.1.2. Gradle 复制链接链接已复制到粘贴板!
dependencies { annotationProcessor 'org.mapstruct:mapstruct-processor:{mapstruct-version}' testAnnotationProcessor 'org.mapstruct:mapstruct-processor:{mapstruct-version}' }
dependencies {
annotationProcessor 'org.mapstruct:mapstruct-processor:{mapstruct-version}'
testAnnotationProcessor 'org.mapstruct:mapstruct-processor:{mapstruct-version}'
}
2.59.3.2. Mapper definition discovery 复制链接链接已复制到粘贴板!
By default, Red Hat build of Apache Camel for Quarkus will automatically discover the package paths of your @Mapper
annotated interfaces or abstract classes and pass them to the Camel MapStruct component.
If you want finer control over the specific packages that are scanned, then you can set a configuration property in application.properties
.
camel.component.mapstruct.mapper-package-name = com.first.package,org.second.package
camel.component.mapstruct.mapper-package-name = com.first.package,org.second.package
2.60. Master 复制链接链接已复制到粘贴板!
Have only a single consumer in a cluster consuming from a given endpoint; with automatic failover if the JVM dies.
2.60.1. What’s inside 复制链接链接已复制到粘贴板!
-
Master component, URI syntax:
master:namespace:delegateUri
Refer to the above link for usage and configuration details.
2.60.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-master</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-master</artifactId>
</dependency>
2.60.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
This extension can be used in conjunction with extensions below:
2.61. Micrometer 复制链接链接已复制到粘贴板!
Collect various metrics directly from Camel routes using the Micrometer library.
2.61.1. What’s inside 复制链接链接已复制到粘贴板!
-
Micrometer component, URI syntax:
micrometer:metricsType:metricsName
Refer to the above link for usage and configuration details.
2.61.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-micrometer</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-micrometer</artifactId>
</dependency>
2.61.3. Usage 复制链接链接已复制到粘贴板!
This extension leverages Quarkus Micrometer. Quarkus supports a variety of Micrometer metric registry implementations.
Your application should declare the following dependency or one of the dependencies listed in the quarkiverse documentation, depending on the monitoring solution you want to work with.
<dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
If no dependency is declared, the Micrometer extension creates a SimpleMeterRegistry
instance, suitable mainly for testing.
2.61.4. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
2.61.4.1. Exposing Micrometer statistics in JMX 复制链接链接已复制到粘贴板!
Exposing Micrometer statistics in JMX is not available in native mode as quarkus-micrometer-registry-jmx
does not have native support at present.
Prometheus backend ignores negative values during increment of Counter metrics.
2.61.4.3. Exposing statistics in JMX 复制链接链接已复制到粘贴板!
In Red Hat build of Apache Camel for Quarkus, registering a JmxMeterRegistry
is simplified. Add a dependency for io.quarkiverse.micrometer.registry:quarkus-micrometer-registry-jmx
and a JmxMeterRegistry
will automatically get created for you.
2.61.5. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Configuration property | Type | Default |
---|---|---|
Set whether to enable the MicrometerRoutePolicyFactory for capturing metrics on route processing times. |
|
|
Set whether to enable the MicrometerMessageHistoryFactory for capturing metrics on individual route node processing times. Depending on the number of configured route nodes, there is the potential to create a large volume of metrics. Therefore, this option is disabled by default. |
|
|
Set whether to enable the MicrometerExchangeEventNotifier for capturing metrics on exchange processing times. |
|
|
Set whether to enable the MicrometerRouteEventNotifier for capturing metrics on the total number of routes and total number of routes running. |
|
|
Set whether to gather performance information about Camel Thread Pools by injecting an InstrumentedThreadPoolFactory. |
|
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.62. Microprofile Fault Tolerance 复制链接链接已复制到粘贴板!
Circuit Breaker EIP using Microprofile Fault Tolerance
2.62.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.62.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-microprofile-fault-tolerance</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-microprofile-fault-tolerance</artifactId>
</dependency>
2.63. MicroProfile Health 复制链接链接已复制到粘贴板!
Expose Camel health checks via MicroProfile Health
2.63.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.63.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-microprofile-health</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-microprofile-health</artifactId>
</dependency>
2.63.3. Usage 复制链接链接已复制到粘贴板!
By default, classes extending AbstractHealthCheck
are registered as both liveness and readiness checks. You can override the isReadiness
method to control this behaviour.
Any checks provided by your application are automatically discovered and bound to the Camel registry. They will be available via the Quarkus health endpoints /q/health/live
and /q/health/ready
.
You can also provide custom HealthCheckRepository
implementations and these are also automatically discovered and bound to the Camel registry for you.
Refer to the Quarkus health guide for further information.
2.63.3.1. Provided health checks 复制链接链接已复制到粘贴板!
Some checks are automatically registered for your application.
2.63.3.1.1. Camel Context Health 复制链接链接已复制到粘贴板!
Inspects the Camel Context status and causes the health check status to be DOWN
if the status is anything other than 'Started'.
2.63.3.1.2. Camel Route Health 复制链接链接已复制到粘贴板!
Inspects the status of each route and causes the health check status to be DOWN
if any route status is not 'Started'.
2.63.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Configuration property | Type | Default |
---|---|---|
Set whether to enable Camel health checks |
|
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.64. Minio 复制链接链接已复制到粘贴板!
Store and retrieve objects from Minio Storage Service using Minio SDK.
2.64.1. What’s inside 复制链接链接已复制到粘贴板!
-
Minio component, URI syntax:
minio:bucketName
Refer to the above link for usage and configuration details.
2.64.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-minio</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-minio</artifactId>
</dependency>
2.64.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Depending on Minio configuration, this extension may require SSL encryption on its connections. In such cases, you will need to add quarkus.ssl.native=true
to your application.properties
. See also Quarkus native SSL guide and Native mode section of Camel Quarkus user guide.
There are two different configuration approaches:
- Minio client can be defined via quarkus properties leveraging the Quarkiverse Minio (see documentation). Camel will autowire client into the Minio component. This configuration allows definition of only one minio client, therefore it isn’t possible to define several different minio endpoints, which run together.
- Provide client/clients for camel registry (e.g. CDI producer/bean) and reference them from endpoint.
minio:foo?minioClient=#minioClient
minio:foo?minioClient=#minioClient
2.65. MLLP 复制链接链接已复制到粘贴板!
Communicate with external systems using the MLLP protocol.
2.65.1. What’s inside 复制链接链接已复制到粘贴板!
-
MLLP component, URI syntax:
mllp:hostname:port
Refer to the above link for usage and configuration details.
2.65.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-mllp</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mllp</artifactId>
</dependency>
2.65.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
-
Check the Character encodings section of the Native mode guide if you wish to use the
defaultCharset
component option.
2.66. Mock 复制链接链接已复制到粘贴板!
Test routes and mediation rules using mocks.
2.66.1. What’s inside 复制链接链接已复制到粘贴板!
-
Mock component, URI syntax:
mock:name
Refer to the above link for usage and configuration details.
2.66.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-mock</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mock</artifactId>
</dependency>
2.66.3. Usage 复制链接链接已复制到粘贴板!
To use camel-mock capabilities in tests it is required to get access to MockEndpoint instances.
CDI injection could be used for accessing instances (see Quarkus documentation). You can inject camelContext into test using @Inject
annotation. Camel context can be then used for obtaining mock endpoints. See the following example:
Route used for the example test:
2.66.4. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
Injection of CDI beans (described in Usage) does not work in native mode.
In the native mode the test and the application under test are running in two different processes and it is not possible to share a mock bean between them (see Quarkus documentation).
2.67. MongoDB 复制链接链接已复制到粘贴板!
Perform operations on MongoDB documents and collections.
2.67.1. What’s inside 复制链接链接已复制到粘贴板!
-
MongoDB component, URI syntax:
mongodb:connectionBean
Refer to the above link for usage and configuration details.
2.67.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-mongodb</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mongodb</artifactId>
</dependency>
2.67.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
The extension leverages the Quarkus MongoDB Client extension. The Mongo client can be configured via the Quarkus MongoDB Client configuration options.
The Camel Quarkus MongoDB extension automatically registers a MongoDB client bean named camelMongoClient
. This can be referenced in the mongodb endpoint URI connectionBean
path parameter. For example:
from("direct:start") .to("mongodb:camelMongoClient?database=myDb&collection=myCollection&operation=findAll")
from("direct:start")
.to("mongodb:camelMongoClient?database=myDb&collection=myCollection&operation=findAll")
If your application needs to work with multiple MongoDB servers, you can create a "named" client and reference in your route by injecting a client and the related configuration as explained in the Quarkus MongoDB extension client injection. For example:
//application.properties quarkus.mongodb.mongoClient1.connection-string = mongodb://root:example@localhost:27017/
//application.properties
quarkus.mongodb.mongoClient1.connection-string = mongodb://root:example@localhost:27017/
Note that when using named clients, the "default" camelMongoClient
bean will still be produced. Refer to the Quarkus documentation on Multiple MongoDB Clients for more information.
2.68. MyBatis 复制链接链接已复制到粘贴板!
Performs a query, poll, insert, update or delete in a relational database using MyBatis.
2.68.1. What’s inside 复制链接链接已复制到粘贴板!
-
MyBatis component, URI syntax:
mybatis:statement
-
MyBatis Bean component, URI syntax:
mybatis-bean:beanName:methodName
Refer to the above links for usage and configuration details.
2.68.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-mybatis</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mybatis</artifactId>
</dependency>
2.68.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Refer to Quarkus MyBatis for configuration. It must enable the following options.
quarkus.mybatis.xmlconfig.enable=true quarkus.mybatis.xmlconfig.path=SqlMapConfig.xml
quarkus.mybatis.xmlconfig.enable=true
quarkus.mybatis.xmlconfig.path=SqlMapConfig.xml
quarkus.mybatis.xmlconfig.path
must be the same with configurationUri
param in the mybatis endpoint.
2.69. Netty HTTP 复制链接链接已复制到粘贴板!
The Netty HTTP extension provides HTTP transport on top of the Netty extension.
2.69.1. What’s inside 复制链接链接已复制到粘贴板!
-
Netty HTTP component, URI syntax:
netty-http:protocol://host:port/path
Refer to the above link for usage and configuration details.
2.69.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-netty-http</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-netty-http</artifactId>
</dependency>
2.69.3. transferException option in native mode 复制链接链接已复制到粘贴板!
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)
2.69.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
- Check the Character encodings section of the Native mode guide if you expect your application to send or receive requests using non-default encodings.
2.70. Netty 复制链接链接已复制到粘贴板!
Socket level networking using TCP or UDP with Netty 4.x.
2.70.1. What’s inside 复制链接链接已复制到粘贴板!
-
Netty component, URI syntax:
netty:protocol://host:port
Refer to the above link for usage and configuration details.
2.70.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-netty</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-netty</artifactId>
</dependency>
2.71. OpenAPI Java 复制链接链接已复制到粘贴板!
Expose OpenAPI resources defined in Camel REST DSL
2.71.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.71.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-openapi-java</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-openapi-java</artifactId>
</dependency>
2.71.3. Usage 复制链接链接已复制到粘贴板!
You can use this extension to expose REST DSL services to Quarkus OpenAPI. With quarkus-smallrye-openapi
, you can access them by /q/openapi?format=json
.
Refer to the Quarkus OpenAPI guide for further information.
This is an experimental feature. You can enable it by
quarkus.camel.openapi.expose.enabled=true
quarkus.camel.openapi.expose.enabled=true
It’s the user’s responsibility to use @RegisterForReflection
to register all model classes for reflection.
It doesn’t support the rest services used in org.apache.camel.builder.LambdaRouteBuilder
right now. Also, it can not use CDI injection in the RouteBuilder configure()
since we get the rest definitions at build time while CDI is unavailable.
2.72. OpenTelemetry 复制链接链接已复制到粘贴板!
Distributed tracing using OpenTelemetry
2.72.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.72.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-opentelemetry</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-opentelemetry</artifactId>
</dependency>
2.72.3. Usage 复制链接链接已复制到粘贴板!
The extension automatically creates a Camel OpenTelemetryTracer
and binds it to the Camel registry.
In order to send the captured traces to a tracing system, you need to configure some properties within application.properties
like those below.
Identifier for the origin of spans created by the application OTLP exporter endpoint
# Identifier for the origin of spans created by the application
quarkus.application.name=my-camel-application
# OTLP exporter endpoint
quarkus.opentelemetry.tracer.exporter.otlp.endpoint=http://localhost:4317
Refer to the Quarkus OpenTelemetry guide for a full list of configuration options.
Route endpoints can be excluded from tracing by configuring a property named quarkus.camel.opentelemetry.exclude-patterns
in application.properties
. For example:
Exclude all direct & netty-http endpoints from tracing
# Exclude all direct & netty-http endpoints from tracing
quarkus.camel.opentelemetry.exclude-patterns=direct:*,netty-http:*
2.72.3.1. Exporters 复制链接链接已复制到粘贴板!
Quarkus OpenTelemetry defaults to the standard OTLP exporter defined in OpenTelemetry. Additional exporters will be available in the Quarkiverse quarkus-opentelemetry-exporter project.
2.72.3.2. Tracing CDI bean method execution 复制链接链接已复制到粘贴板!
When instrumenting the execution of CDI bean methods from Camel routes, you should annotate such methods with io.opentelemetry.extension.annotations.WithSpan
. Methods annotated with @WithSpan
will create a new Span and establish any required relationships with the current Trace context.
For example, to instrument a CDI bean from a Camel route, first ensure the appropriate methods are annotated with @WithTrace
.
Next, use the bean in your Camel route.
To ensure that the sequence of recorded spans is correct, you must use the full to("bean:")
endpoint URI and not the shortened .bean()
EIP DSL method.
There is more information about CDI instrumentation in the Quarkus OpenTelemetry guide.
2.72.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
Configuration property | Type | Default |
---|---|---|
Sets whether header names need to be encoded. Can be useful in situations where OpenTelemetry propagators potentially set header name values in formats that are not compatible with the target system. E.g for JMS where the specification mandates header names are valid Java identifiers. |
|
|
Sets whether to disable tracing for endpoint URIs that match the given patterns. The pattern can take the following forms: 1. An exact match on the endpoint URI. E.g platform-http:/some/path 2. A wildcard match. E.g platform-http:* 3. A regular expression matching the endpoint URI. E.g platform-http:/prefix/.* |
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.73. Paho MQTT5 复制链接链接已复制到粘贴板!
Communicate with MQTT message brokers using Eclipse Paho MQTT v5 Client.
2.73.1. What’s inside 复制链接链接已复制到粘贴板!
-
Paho MQTT 5 component, URI syntax:
paho-mqtt5:topic
Refer to the above link for usage and configuration details.
2.73.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-paho-mqtt5</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-paho-mqtt5</artifactId>
</dependency>
2.74. Paho 复制链接链接已复制到粘贴板!
Communicate with MQTT message brokers using Eclipse Paho MQTT Client.
2.74.1. What’s inside 复制链接链接已复制到粘贴板!
-
Paho component, URI syntax:
paho:topic
Refer to the above link for usage and configuration details.
2.74.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-paho</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-paho</artifactId>
</dependency>
2.75. Platform HTTP 复制链接链接已复制到粘贴板!
This extension allows for creating HTTP endpoints for consuming HTTP requests.
It is built on top of the Eclipse Vert.x HTTP server provided by the quarkus-vertx-http
extension.
2.75.1. What’s inside 复制链接链接已复制到粘贴板!
-
Platform HTTP component, URI syntax:
platform-http:path
Refer to the above link for usage and configuration details.
2.75.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-platform-http</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-platform-http</artifactId>
</dependency>
2.75.3. Usage 复制链接链接已复制到粘贴板!
2.75.3.1. Basic Usage 复制链接链接已复制到粘贴板!
Serve all HTTP methods on the /hello
endpoint:
from("platform-http:/hello").setBody(simple("Hello ${header.name}"));
from("platform-http:/hello").setBody(simple("Hello ${header.name}"));
Serve only GET requests on the /hello
endpoint:
from("platform-http:/hello?httpMethodRestrict=GET").setBody(simple("Hello ${header.name}"));
from("platform-http:/hello?httpMethodRestrict=GET").setBody(simple("Hello ${header.name}"));
2.75.3.2. Using platform-http via Camel REST DSL 复制链接链接已复制到粘贴板!
To be able to use Camel REST DSL with the platform-http
component, add camel-quarkus-rest
to your pom.xml
:
<dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-rest</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-rest</artifactId>
</dependency>
Then you can use the Camel REST DSL:
2.75.3.3. Handling multipart/form-data file uploads 复制链接链接已复制到粘贴板!
You can restrict the uploads to certain file extensions by white listing them:
2.75.3.4. Securing platform-http endpoints 复制链接链接已复制到粘贴板!
Quarkus provides a variety of security and authentication mechanisms which can be used to secure platform-http
endpoints. Refer to the Quarkus Security documentation for further details.
Within a route, it is possible to obtain the authenticated user and its associated SecurityIdentity
and Principal
:
Also check the quarkus.http.body.*
configuration options in Quarkus documentation, esp. quarkus.http.body.handle-file-uploads
, quarkus.http.body.uploads-directory
and quarkus.http.body.delete-uploaded-files-on-end
.
2.75.3.5. Implementing a reverse proxy 复制链接链接已复制到粘贴板!
Platform HTTP component can act as a reverse proxy, in that case Exchange.HTTP_URI
, Exchange.HTTP_HOST
headers are populated from the absolute URL received on the request line of the HTTP request.
Here’s an example of a HTTP proxy that simply redirects the Exchange to the origin server.
from("platform-http:proxy") .toD("http://" + "${headers." + Exchange.HTTP_HOST + "}");
from("platform-http:proxy")
.toD("http://"
+ "${headers." + Exchange.HTTP_HOST + "}");
2.75.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.75.4.1. Platform HTTP server configuration 复制链接链接已复制到粘贴板!
Configuration of the platform HTTP server is managed by Quarkus. Refer to the Quarkus HTTP configuration guide for the full list of configuration options.
To configure SSL for the Platform HTTP server, follow the secure connections with SSL guide. Note that configuring the server for SSL with SSLContextParameters
is not currently supported.
2.75.4.2. Character encodings 复制链接链接已复制到粘贴板!
Check the Character encodings section of the Native mode guide if you expect your application to send or receive requests using non-default encodings.
2.76. Quartz 复制链接链接已复制到粘贴板!
Schedule sending of messages using the Quartz 2.x scheduler.
2.76.1. What’s inside 复制链接链接已复制到粘贴板!
-
Quartz component, URI syntax:
quartz:groupName/triggerName
Refer to the above link for usage and configuration details.
2.76.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-quartz</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-quartz</artifactId>
</dependency>
2.76.3. Usage 复制链接链接已复制到粘贴板!
2.77. Ref 复制链接链接已复制到粘贴板!
Route messages to an endpoint looked up dynamically by name in the Camel Registry.
2.77.1. What’s inside 复制链接链接已复制到粘贴板!
-
Ref component, URI syntax:
ref:name
Refer to the above link for usage and configuration details.
2.77.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-ref</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-ref</artifactId>
</dependency>
2.77.3. Usage 复制链接链接已复制到粘贴板!
CDI producer methods can be harnessed to bind endpoints to the Camel registry, so that they can be resolved using the ref
URI scheme in Camel routes.
For example, to produce endpoint beans:
Use ref:
to refer to the names of the CDI beans that were bound to the Camel registry:
2.78. REST OpenApi 复制链接链接已复制到粘贴板!
Configure REST producers based on an OpenAPI specification document delegating to a component implementing the RestProducerFactory interface.
2.78.1. What’s inside 复制链接链接已复制到粘贴板!
-
REST OpenApi component, URI syntax:
rest-openapi:specificationUri#operationId
Refer to the above link for usage and configuration details.
2.78.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-rest-openapi</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-rest-openapi</artifactId>
</dependency>
2.78.3. Usage 复制链接链接已复制到粘贴板!
2.78.3.1. Required Dependencies 复制链接链接已复制到粘贴板!
A RestProducerFactory
implementation must be available when using the rest-openapi extension. The currently known extensions are:
- camel-quarkus-http
Maven users will need to add one of these dependencies to their pom.xml
, for example:
<dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-http</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-http</artifactId>
</dependency>
Depending on which mechanism is used to load the OpenApi specification, additional dependencies may be required. When using the file
resource locator, the org.apache.camel.quarkus:camel-quarkus-file
extension must be added as a project dependency. When using ref
or bean
to load the specification, not only must the org.apache.camel.quarkus:camel-quarkus-bean
dependency be added, but the bean itself must be annotated with @RegisterForReflection
.
When using the classpath
resource locator with native code, the path to the OpenAPI specification must be specified in the quarkus.native.resources.includes
property of the application.properties
file. For example:
quarkus.native.resources.includes=openapi.json
quarkus.native.resources.includes=openapi.json
2.79. Rest 复制链接链接已复制到粘贴板!
Expose REST services and their OpenAPI Specification or call external REST services.
2.79.1. What’s inside 复制链接链接已复制到粘贴板!
-
REST component, URI syntax:
rest:method:path:uriTemplate
-
REST API component, URI syntax:
rest-api:path
Refer to the above links for usage and configuration details.
2.79.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-rest</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-rest</artifactId>
</dependency>
2.79.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
This extension depends on the Platform HTTP extension and configures it as the component that provides the REST transport.
When using the platform-http
REST transport, some characters are not allowed within path parameter names. This includes the '-' and '$' characters.
In order to make the below example REST /dashed/param
route work correctly, a system property is required io.vertx.web.route.param.extended-pattern=true
.
There is some more background to this in the Vert.x Web documentation.
2.79.3.2. Configuring alternate REST transport providers 复制链接链接已复制到粘贴板!
To use another REST transport provider, such as netty-http
or servlet
, you need to add the respective extension as a dependency to your project and set the provider in your RouteBuilder
. E.g. for servlet
, you’d have to add the org.apache.camel.quarkus:camel-quarkus-servlet
dependency and the set the provider as follows:
2.80. Salesforce 复制链接链接已复制到粘贴板!
Communicate with Salesforce using Java DTOs.
2.80.1. What’s inside 复制链接链接已复制到粘贴板!
-
Salesforce component, URI syntax:
salesforce:operationName:topicName
Refer to the above link for usage and configuration details.
2.80.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-salesforce</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-salesforce</artifactId>
</dependency>
2.80.3. Usage 复制链接链接已复制到粘贴板!
To generate Salesforce DTOs for your project, use the salesforce-maven-plugin
. The example code snippet below creates a single DTO for the Account
object.
2.80.4. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.81. SAP 复制链接链接已复制到粘贴板!
Provides SAP Camel Component
2.81.1. What’s inside 复制链接链接已复制到粘贴板!
The SAP extension is a package consisting of ten different SAP components. There are remote function call (RFC) components that support the sRFC, tRFC, and qRFC protocols and there are IDoc components that facilitate communication using messages in IDoc format. The component uses the SAP Java Connector (SAP JCo) library to facilitate bidirectional communication with SAP and the SAP IDoc library to transmit the documents in the Intermediate Document (IDoc) format.
See below for details.
2.81.2. Maven coordinates 复制链接链接已复制到粘贴板!
<dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-sap</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-sap</artifactId>
</dependency>
Because the SAP component depends on the third-party JCo 3 and IDoc 3 libraries, it can only be installed on the platforms that these libraries support.
2.81.2.2. SAP JCo and SAP IDoc libraries 复制链接链接已复制到粘贴板!
A prerequisite for using the SAP component is that the SAP Java Connector (SAP JCo) libraries and the SAP IDoc library are installed into the lib/
directory of the Java runtime. You must make sure that you download the appropriate set of SAP libraries for your target operating system from the SAP Service Marketplace.
The names of the library files vary depending on the target operating system, as shown below.
SAP Component | Linux and UNIX | Windows |
---|---|---|
SAP JCo 3 |
|
|
SAP IDoc |
|
|
2.81.3. URI format 复制链接链接已复制到粘贴板!
There are two different kinds of endpoint provided by the SAP component: the Remote Function Call (RFC) endpoints, and the Intermediate Document (IDoc) endpoints.
The URI formats for the RFC endpoints are as follows:
sap-srfc-destination:destinationName:rfcName sap-trfc-destination:destinationName:rfcName sap-qrfc-destination:destinationName:queueName:rfcName sap-srfc-server:serverName:rfcName[?options] sap-trfc-server:serverName:rfcName[?options]
sap-srfc-destination:destinationName:rfcName
sap-trfc-destination:destinationName:rfcName
sap-qrfc-destination:destinationName:queueName:rfcName
sap-srfc-server:serverName:rfcName[?options]
sap-trfc-server:serverName:rfcName[?options]
The URI formats for the IDoc endpoints are as follows:
sap-idoc-destination:destinationName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]] sap-idoclist-destination:destinationName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]] sap-qidoc-destination:destinationName:queueName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]] sap-qidoclist-destination:destinationName:queueName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]] sap-idoclist-server:serverName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]][?options]
sap-idoc-destination:destinationName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]]
sap-idoclist-destination:destinationName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]]
sap-qidoc-destination:destinationName:queueName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]]
sap-qidoclist-destination:destinationName:queueName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]]
sap-idoclist-server:serverName:idocType[:idocTypeExtension[:systemRelease[:applicationRelease]]][?options]
The URI formats prefixed by sap-endpointKind-destination are used to define destination endpoints (in other words, Camel producer endpoints) and destinationName is the name of a specific outbound connection to an SAP instance. Outbound connections are named and configured at the component level.
The URI formats prefixed by sap-endpointKind-server are used to define server endpoints (in other words, Camel consumer endpoints) and serverName is the name of a specific inbound connection from an SAP instance. Inbound connections are named and configured at the component level.
The other components of an RFC endpoint URI are as follows:
- rfcName
- (Required) In a destination endpoint URI, is the name of the RFC invoked by the endpoint in the connected SAP instance. In a server endpoint URI, is the name of the RFC handled by the endpoint when invoked from the connected SAP instance.
- queueName
- Specifies the queue this endpoint sends an SAP request to.
The other components of an IDoc endpoint URI are as follows:
- idocType
- (Required) Specifies the Basic IDoc Type of an IDoc produced by this endpoint.
- idocTypeExtension
- Specifies the IDoc Type Extension, if any, of an IDoc produced by this endpoint.
- systemRelease
- Specifies the associated SAP Basis Release, if any, of an IDoc produced by this endpoint.
- applicationRelease
- Specifies the associated Application Release, if any, of an IDoc produced by this endpoint.
- queueName
- Specifies the queue this endpoint sends an SAP request to.
2.81.3.1. Options for RFC destination endpoints 复制链接链接已复制到粘贴板!
The RFC destination endpoints (sap-srfc-destination
, sap-trfc-destination
, and sap-qrfc-destination
) support the following URI options:
Name | Default | Description |
---|---|---|
|
|
If |
|
|
If |
2.81.3.2. Options for RFC server endpoints 复制链接链接已复制到粘贴板!
The SAP RFC server endpoints (sap-srfc-server
and sap-trfc-server
) support the following URI options:
Name | Default | Description |
---|---|---|
|
|
If |
|
|
(sap-trfc-server endpoint only) If |
2.81.3.3. Options for the IDoc List Server endpoint 复制链接链接已复制到粘贴板!
The SAP IDoc List Server endpoint (sap-idoclist-server
) supports the following URI options:
Name | Default | Description |
---|---|---|
|
|
If |
|
|
If |
2.81.3.4. Summary of the RFC and IDoc endpoints 复制链接链接已复制到粘贴板!
The SAP component package provides the following RFC and IDoc endpoints:
sap-srfc-destination
Camel SAP Synchronous Remote Function Call Destination Camel component. This endpoint should be used in cases where Camel routes require synchronous delivery of requests to and responses from an SAP system.
NoteThe sRFC protocol used by this component delivers requests and responses to and from an SAP system, using best effort. In case of a communication error while sending a request, the completion status of a remote function call in the receiving SAP system remains in doubt.
sap-trfc-destination
Camel SAP Transactional Remote Function Call Destination Camel component. This endpoint should be used in cases where requests must be delivered to the receiving SAP system at most once. To accomplish this, the component generates a transaction ID,
tid
, which accompanies every request sent through the component in a route’s exchange. The receiving SAP system records thetid
accompanying a request before delivering the request; if the SAP system receives the request again with the sametid
it will not deliver the request. Thus if a route encounters a communication error when sending a request through an endpoint of this component, it can retry sending the request within the same exchange knowing it will be delivered and executed only once.NoteThe tRFC protocol used by this component is asynchronous and does not return a response. Thus the endpoints of this component do not return a response message.
NoteThis component does not guarantee the order of a series of requests through its endpoints, and the delivery and execution order of these requests may differ on the receiving SAP system due to communication errors and resends of a request. For guaranteed delivery order, please see the Camel SAP Queued Remote Function Call Destination Camel component.
sap-qrfc-destination
Camel SAP Queued Remote Function Call Destination Camel component. This component extends the capabilities of the Transactional Remote Function Call Destination camel component by adding in order delivery guarantees to the delivery of requests through its endpoints. This endpoint should be used in cases where a series of requests depend on each other and must be delivered to the receiving SAP system at most once and in order. The component accomplishes the at most once delivery guarantees using the same mechanisms as the Camel SAP Transactional Remote Function Call Destination Camel component. The ordering guarantee is accomplished by serializing the requests in the order they are received by the SAP system to an inbound queue. Inbound queues are processed by the QIN scheduler within SAP. When the inbound queue is activated, the QIN Scheduler will execute the queue requests in order.
NoteThe qRFC protocol used by this component is asynchronous and does not return a response. Thus the endpoints of this component do not return a response message.
sap-srfc-server
- Camel SAP Synchronous Remote Function Call Server Camel component. This component and its endpoints should be used in cases where a Camel route is required to synchronously handle requests from and responses to an SAP system.
sap-trfc-server
-
Camel SAP Transactional Remote Function Call Server Camel component. This endpoint should be used in cases where the sending SAP system requires at most once delivery of its requests to a Camel route. To accomplish this, the sending SAP system generates a transaction ID,
tid
, which accompanies every request it sends to the component’s endpoints. The sending SAP system will first check with the component whether a giventid
has been received by it before sending a series of requests associated with thetid
. The component will check the list of receivedtid
s it maintains, record the senttid
if it is not in that list, and then respond to the sending SAP system, indicating whether or not thetid
has already been recorded. The sending SAP system will only then send the series of requests, if thetid
has not been previously recorded. This enables a sending SAP system to reliably send a series of requests once to a camel route. sap-idoc-destination
- Camel SAP IDoc Destination Camel component. This endpoint should be used in cases where a Camel route sends a list of Intermediate Documents (IDocs) to an SAP system.
sap-idoclist-destination
- Camel SAP IDoc List Destination Camel component. This endpoint should be used in cases where a Camel route sends a list of Intermediate documents (IDocs) list to an SAP system.
sap-qidoc-destination
- Camel SAP Queued IDoc Destination Camel component. This component and its endpoints should be used in cases where a Camel route is required to send a list of Intermediate documents (IDocs) to an SAP system in order.
sap-qidoclist-destination
- Camel SAP Queued IDoc List Destination Camel component. This component and its endpoints are used in cases where a camel route sends the Intermediate documents (IDocs) list to an SAP system in order.
sap-idoclist-server
-
Camel SAP IDoc List Server Camel component. This endpoint should be used in cases where a sending SAP system requires delivery of Intermediate Document lists to a Camel route. This component uses the tRFC protocol to communicate with SAP as described in the
sap-trfc-server-standalone
quick start.
2.81.3.5. SAP RFC destination endpoint 复制链接链接已复制到粘贴板!
An RFC destination endpoint supports outbound communication to SAP, which enable these endpoints to make RFC calls out to ABAP function modules in SAP. An RFC destination endpoint is configured to make an RFC call to a specific ABAP function over a specific connection to an SAP instance. An RFC destination is a logical designation for an outbound connection and has a unique name. An RFC destination is specified by a set of connection parameters called destination data.
An RFC destination endpoint will extract an RFC request from the input message of the IN-OUT exchanges it receives and dispatch that request in a function call to SAP. The response from the function call will be returned in the output message of the exchange. Since SAP RFC destination endpoints only support outbound communication, an RFC destination endpoint only supports the creation of producers.
2.81.3.6. SAP RFC server endpoint 复制链接链接已复制到粘贴板!
An RFC server endpoint supports inbound communication from SAP, which enables ABAP applications in SAP to make RFC calls into server endpoints. An ABAP application interacts with an RFC server endpoint as if it were a remote function module. An RFC server endpoint is configured to receive an RFC call to a specific RFC function over a specific connection from an SAP instance. An RFC server is a logical designation for an inbound connection and has a unique name. An RFC server is specified by a set of connection parameters called server data.
An RFC server endpoint will handle an incoming RFC request and dispatch it as the input message of an IN-OUT exchange. The output message of the exchange will be returned as the response of the RFC call. Since SAP RFC server endpoints only support inbound communication, an RFC server endpoint only supports the creation of consumers.
2.81.3.7. SAP IDoc and IDoc list destination endpoints 复制链接链接已复制到粘贴板!
An IDoc destination endpoint supports outbound communication to SAP, which can then perform further processing on the IDoc message. An IDoc document represents a business transaction, which can easily be exchanged with non-SAP systems. An IDoc destination is specified by a set of connection parameters called destination data.
An IDoc list destination endpoint is similar to an IDoc destination endpoint, except that the messages it handles consist of a list of IDoc documents.
2.81.3.8. SAP IDoc list server endpoint 复制链接链接已复制到粘贴板!
An IDoc list server endpoint supports inbound communication from SAP, enabling a Camel route to receive a list of IDoc documents from an SAP system. An IDoc list server is specified by a set of connection parameters called server data.
2.81.3.9. Metadata repositories 复制链接链接已复制到粘贴板!
A metadata repository is used to store the following kinds of metadata:
- Interface descriptions of function modules
- This metadata is used by the JCo and ABAP runtimes to check RFC calls to ensure the type-safe transfer of data between communication partners before dispatching those calls. A repository is populated with repository data. Repository data is a map of named function templates. A function template contains the metadata describing all the parameters and their typing information passed to and from a function module and has the unique name of the function module it describes.
- IDoc type descriptions
- This metadata is used by the IDoc runtime to ensure that the IDoc documents are correctly formatted before being sent to a communication partner. A basic IDoc type consists of a name, a list of permitted segments, and a description of the hierarchical relationship between the segments. Some additional constraints can be imposed on the segments: a segment can be mandatory or optional; and it is possible to specify a minimum/maximum range for each segment (defining the number of allowed repetitions of that segment).
SAP destination and server endpoints thus require access to a repository, in order to send and receive RFC calls and in order to send and receive IDoc documents. For RFC calls, the metadata for all function modules invoked and handled by the endpoints must reside within the repository; and for IDoc endpoints, the metadata for all IDoc types and IDoc type extensions handled by the endpoints must reside within the repository. The location of the repository used by a destination and server endpoint is specified in the destination data and the server data of their respective connections.
In the case of an SAP destination endpoint, the repository it uses typically resides in an SAP system, and it defaults to the SAP system it is connected to. This default requires no explicit configuration in the destination data. Furthermore, the metadata for the remote function call that a destination endpoint makes will already exist in a repository for any existing function module that it calls. The metadata for calls made by destination endpoints thus require no configuration in the SAP component.
On the other hand, the metadata for function calls handled by server endpoints do not typically reside in the repository of an SAP system and must instead be provided by a repository residing in the SAP component. The SAP component maintains a map of named metadata repositories. The name of a repository corresponds to the name of the server to which it provides metadata.
2.81.4. Configuration 复制链接链接已复制到粘贴板!
The SAP component maintains three maps to store destination data, server data, and repository data. The destination data store and the server data store are configured on a special configuration object, SapConnectionConfiguration
, which automatically gets injected into the SAP component. The repository data store must be configured directly on the relevant SAP component.
2.81.4.1. Configuration Overview 复制链接链接已复制到粘贴板!
The SAP component maintains three maps to store destination data, server data, and repository data. The component’s property, destinationDataStore
, stores destination data keyed by destination name, the property, serverDataStore
, stores server data keyed by server name and the property, repositoryDataStore
, stores repository data keyed by repository name. These configurations must be passed to the component during its initialization.
Example
The following example shows how to configure a sample destination data store and a sample server data store. The sap-configuration
bean (of type SapConnectionConfiguration
) will be automatically injected into any SAP component that is used in this application.
The values can be supplied from the application.properties
file. In that case, you can use the property name instead of the hardcoded value.
For example:
ConfigProvider.getConfig().getValue("<property name>", String.class)
2.81.4.2. Destination Configuration 复制链接链接已复制到粘贴板!
The configurations for destinations are maintained in the destinationDataStore
property of the SAP component. Each entry in this map configures a distinct outbound connection to an SAP instance. The key for each entry is the name of the outbound connection and is used in the destinationName component of a destination endpoint URI as described in the URI format section.
The value for each entry is a destination data configuration object - org.fusesource.camel.component.sap.model.rfc.impl.DestinationDataImpl
- that specifies the configuration of an outbound SAP connection.
Sample destination configuration
The following code shows how to configure a sample destination with the name, quickstartDest
:
After configuring the destination as shown above, you can invoke the BAPI_FLCUST_GETLIST
remote function call on the quickstartDest
destination with the following URI:
sap-srfc-destination:quickstartDest:BAPI_FLCUST_GETLIST
sap-srfc-destination:quickstartDest:BAPI_FLCUST_GETLIST
2.81.4.2.1. Interceptor for tRFC and qRFC destinations 复制链接链接已复制到粘贴板!
The preceding sample destination configuration shows the instantiation of a CurrentProcessorDefinitionInterceptStrategy
object. This object installs an interceptor in the Camel runtime, which enables the Camel SAP component to keep track of its position within a Camel route while it is handling RFC transactions.
This interceptor is critically important for transactional RFC destination endpoints (such as sap-trfc-destination
and sap-qrfc-destination
) and must be installed in the Camel runtime for outbound transactional RFC communication to be properly managed. The Destination RFC Transaction Handlers issues warnings into the Camel log if the strategy is not found at runtime. In this situation the Camel runtime will need to be re-provisioned and restarted to properly manage outbound transactional RFC communication.
2.81.4.2.2. Log on and authentication options 复制链接链接已复制到粘贴板!
The following table lists the log on and authentication options for configuring a destination in the SAP destination data store:
Name | Default Value | Description |
| SAP client, mandatory log on parameter. | |
| log on user, log on parameter for password based authentication. | |
| log on user alias, can be used instead of log on user. | |
| User identity used for log on to the ABAP AS. Used by the JCo runtime, if the destination configuration uses SSO/assertion ticket, certificate, current user ,or SNC environment for authentication. The user ID is mandatory, if neither user nor user alias is set. This ID will never be sent to the SAP backend, it will be used by the JCo runtime locally. | |
| log on password, log on parameter for password based authentication. | |
| log on language, if not defined, the default user language is used. | |
| Use the specified SAP Cookie Version 2 as a log on ticket for SSO based authentication. | |
| Use the specified X509 certificate for certificate based authentication. | |
| Postpone the authentication until the first call - 1 (enable). Used in special cases only. | |
| Use a visible, hidden, or do not use SAP GUI | |
| Additional log on parameter to define the codepage used to convert the log on parameters. Used in special cases only. | |
| Order an SSO ticket after log on, the obtained ticket is available in the destination attributes. | |
|
If set to |
2.81.4.2.3. Connection options 复制链接链接已复制到粘贴板!
The following table lists the connection options for configuring a destination in the SAP destination data store:
Name | Default Value | Description |
|
SAP Router string for connection to systems behind a SAP Router. SAP Router string contains the chain of SAP Routers and theirs port numbers and has the form: | |
| System number of the SAP ABAP application server, mandatory for a direct connection. | |
| SAP ABAP application server, mandatory for a direct connection. | |
| SAP message server, mandatory property for a load balancing connection. | |
|
SAP message server port, optional property for a load balancing connection. In order to resolve the service names sapmsXXX a lookup in | |
| Allows specifying a concrete gateway, which should be used for establishing the connection to an application server. If not specified, the gateway on the application server is used. | |
| Should be set, when using gwhost. Allows specifying the port used on that gateway. If not specified, the port of the gateway on the application server is used. In order to resolve the service names sapgwXXX a lookup in etc/services is performed by the network layer of the operating system. If using port numbers instead of symbolic service names, no lookups are performed and no additional entries are needed. | |
| System ID of the SAP system, mandatory property for a load balancing connection. | |
| Group of SAP application servers, mandatory property for a load balancing connection. | |
|
|
Set this value depending on the network quality between JCo and your target system to optimize performance. The valid values are |
|
|
The valid values are |
2.81.4.2.4. Connection pool options 复制链接链接已复制到粘贴板!
The following table lists the connection pool options for configuring a destination in the SAP destination data store:
Name | Default Value | Description |
|
|
Maximum number of active outbound connections that can be created for a destination simultaneously. A value of |
|
|
Maximum number of idle outbound connections kept open by the destination. A value of |
| Time in milliseconds after which a free connection held internally by the destination can be closed. | |
| Period in milliseconds after which the destination checks the released connections for expiration. | |
| Maximum time in milliseconds to wait for a connection, if the maximum allowed number of connections has already been allocated by the application. |
2.81.4.2.5. Secure network connection options 复制链接链接已复制到粘贴板!
The following table lists the secure network options for configuring a destination in the SAP destination data store:
Name | Default Value | Description |
|
Secure network connection (SNC) mode, | |
|
SNC partner, for example: | |
|
SNC level of security: | |
| Own SNC name. Overrides the environment settings. | |
| Path to the library that provides the SNC service. |
2.81.4.2.6. Repository options 复制链接链接已复制到粘贴板!
The following table lists the repository options for configuring a destination in the SAP destination data store:
Name | Default Value | Description |
| Specifies the destination which is used as a repository. | |
| If a repository destination is not set, and this property is set, it is used as user for repository calls. This enables you to use a different user for repository lookups. | |
| The password for a repository user. Mandatory, if a repository user is used. | |
|
(Optional) If SNC is used for this destination, it is possible to turn it off for repository connections, if this property is set to | |
|
Enable the
If the property is not set, the destination initially does a remote call to check whether Note: If the repository is already initialized (for example, because it is used by some other destination), this property does not have any effect. Generally, this property is related to the ABAP System, and should have the same value on all destinations pointing to the same ABAP System. See note 1456826 for backend prerequisites. |
2.81.4.2.7. Trace configuration options 复制链接链接已复制到粘贴板!
The following table lists the trace configuration options for configuring a destination in the SAP destination data store:
Name | Default Value | Description |
|
Enable/disable RFC trace ( | |
|
Enable/disable CPIC trace |
2.81.4.3. Server Configuration 复制链接链接已复制到粘贴板!
The configurations for servers are maintained in the serverDataStore
property of the SAP component. Each entry in this map configures a distinct inbound connection from an SAP instance. The key for each entry is the name of the outbound connection and is used in the serverName
component of a server endpoint URI as described in the URI format section.
The value for each entry is a server data configuration object, org.fusesource.camel.component.sap.model.rfc.impl.ServerDataImpl
, which defines the configuration of an inbound SAP connection.
Sample server configuration
The following code shows how to create a sample server configuration with the name, quickstartServer
.
This example also configures a destination connection, quickstartDest
, which the server uses to retrieve metadata from a remote SAP instance. This destination is configured in the server data through the repositoryDestination
option. If you do not configure this option, you must create a local metadata repository instead.
After configuring the destination as shown above, you can handle the BAPI_FLCUST_GETLIST
remote function call on the quickstartDest
remote function call from an invoking client, using the following URI:
sap-srfc-server:quickstartServer:BAPI_FLCUST_GETLIST
sap-srfc-server:quickstartServer:BAPI_FLCUST_GETLIST
2.81.4.3.1. Required options 复制链接链接已复制到粘贴板!
The required options for the server data configuration object are, as follows:
Name | Default Value | Description |
| Gateway host on which the server connection should be registered. | |
|
Gateway service, which is the port on which a registration can be done. In order to resolve the service names | |
| The program ID with which the registration is done. Serves as an identifier on the gateway and in the destination in the ABAP system. | |
| Specifies a destination name that the server can use in order to retrieve metadata from a metadata repository hosted in a remote SAP server. | |
| The number of connections that should be registered at the gateway. |
2.81.4.3.2. Secure network connection options 复制链接链接已复制到粘贴板!
The secure network connection options for the server data configuration object are as follows:
Name | Default Value | Description |
|
Secure network connection (SNC) mode, | |
|
SNC level of security, | |
|
SNC name of your server. Overrides the default SNC name. Typically something like | |
|
Path to library which provides SNC service. If this property is not provided, the value of the |
2.81.4.3.3. Other options 复制链接链接已复制到粘贴板!
The other options for the server data configuration object are, as follows:
Name | Default Value | Description |
|
SAP router string to use for a system protected by a firewall, which can therefore only be reached through a SAProuter, when registering the server at the gateway of that ABAP System. A typical router string is | |
| The maximum time (in seconds) between two start-up attempts in case of failures. The waiting time is doubled from initially 1 second after each start-up failure until either the maximum value is reached or the server could be started successfully. | |
|
Enable/disable RFC trace ( | |
|
The maximum number of threads used by the server connection. If not set, the value for the | |
|
The minimum number of threads used by server connection. If not set, the value for |
2.81.4.4. Repository Configuration 复制链接链接已复制到粘贴板!
The configurations for repositories are maintained in the repositoryDataStore
property of the SAP Component. Each entry in this map configures a distinct repository. The key for each entry is the name of the repository and this key also corresponds to the name of the server to which this repository is attached.
The value of each entry is a repository data configuration object, org.fusesource.camel.component.sap.model.rfc.impl.RepositoryDataImpl
, that defines the contents of a metadata repository. A repository data object is a map of function template configuration objects, org.fuesource.camel.component.sap.model.rfc.impl.FunctionTemplateImpl
. Each entry in this map specifies the interface of a function module and the key for each entry is the name of the function module specified.
Repository data example
The following code shows a simple example of configuring a metadata repository:
2.81.4.4.1. Function template properties 复制链接链接已复制到粘贴板!
The interface of a function module consists of four parameter lists by which data is transferred back and forth to the function module in an RFC call. Each parameter list consists of one or more fields, each of which is a named parameter transferred in an RFC call. The following parameter lists and exception list are supported:
- The import parameter list contains parameter values sent to a function module in an RFC call;
- The export parameter list contains parameter values that are returned by a function module in an RFC call;
- The changing parameter list contains parameter values sent to and returned by a function module in an RFC call;
- The table parameter list contains internal table values sent to and returned by a function module in an RFC call.
- The interface of a function module also consists of an exception list of ABAP exceptions that may be raised when the module is invoked in an RFC call.
A function template describes the name and type of parameters in each parameter list of a function interface and the ABAP exceptions thrown by the function. A function template object maintains five property lists of metadata objects, as described in the following table.
Property | Description |
|
A list of list field metadata objects, |
|
A list of list field metadata objects, |
|
A list of list field metadata objects, |
|
A list of list field metadata objects, |
|
A list of ABAP exception metadata objects, |
Function template example
The following example shows an outline of how to configure a function template:
2.81.4.4.2. List field metadata properties 复制链接链接已复制到粘贴板!
A list field metadata object, org.fusesource.camel.component.sap.model.rfc.impl.ListFieldMeataDataImpl
, specifies the name and type of a field in a parameter list. For an elementary parameter field (CHAR
, DATE
, BCD
, TIME
, BYTE
, NUM
, FLOAT
, INT
, INT1
, INT2
, DECF16
, DECF34
, STRING
, XSTRING
), the following table lists the configuration properties that may be set on a list field metadata object:
Name | Default Value | Description |
| - | The name of the parameter field. |
| - | The parameter type of the field. |
| - | The field length in bytes for a non-Unicode layout. This value depends on the parameter type. |
| - | The field length in bytes for a Unicode layout. This value depends on the parameter type. |
|
| The number of decimals in field value. Required for parameter types BCD and FLOAT. |
|
|
If |
Note that all elementary parameter fields require that the name
, type
, byteLength
, and unicodeByteLength
properties be specified in the field metadata object. In addition, the BCD
, FLOAT
, DECF16
, and DECF34
fields require the decimal property to be specified in the field metadata object.
For a complex parameter field of type TABLE
or STRUCTURE
, the following table lists the configuration properties that may be set on a list field metadata object:
Name | Default Value | Description |
| - | The name of the parameter field. |
| - | The parameter type of the field. |
| - |
The metadata for the structure or table. A record metadata object, |
|
|
If |
All complex parameter fields require that the name
, type
, and recordMetaData
properties be specified in the field metadata object. The value of the recordMetaData
property is a record field metadata object, org.fusesource.camel.component.sap.model.rfc.impl.RecordMetaDataImpl
, which specifies the structure of a nested structure or the structure of a table row.
Elementary list field metadata example
The following metadata configuration specifies an optional, 24-digit packed BCD number parameter with two decimal places named TICKET_PRICE
:
Complex list field metadata example
The following metadata configuration specifies a required TABLE
parameter named CONNINFO
with a row structure specified by the connectionInfo
record metadata object:
ListFieldMetaData metaData = new ListFieldMetaDataImpl(); metaData.setName("CONNINFO"); metaData.setType(DataType.TABLE); RecordMetaData connectionInfo = new RecordMetaDataImpl(); metaData.setRecordMetaData(connectionInfo);
ListFieldMetaData metaData = new ListFieldMetaDataImpl();
metaData.setName("CONNINFO");
metaData.setType(DataType.TABLE);
RecordMetaData connectionInfo = new RecordMetaDataImpl();
metaData.setRecordMetaData(connectionInfo);
2.81.4.4.3. Record metadata properties 复制链接链接已复制到粘贴板!
A record metadata object, org.fusesource.camel.component.sap.model.rfc.impl.RecordMetaDataImpl
, specifies the name and contents of a nested STRUCTURE
or the row of a TABLE
parameter. A record metadata object maintains a list of record field metadata objects, org.fusesource.camel.component.sap.model.rfc.impl.FieldMetaDataImpl
, which specifies the parameters that reside in the nested structure or table row.
The following table lists configuration properties that may be set on a record metadata object:
Name | Default Value | Description |
| - | The name of the record. |
| - |
The list of record field metadata objects, |
All properties of the record metadata object are required.
Record metadata example
The following example shows how to configure a record metadata object:
RecordMetaData connectionInfo = new RecordMetaDataImpl(); connectionInfo.setName("CONNECTION_INFO"); connectionInfo.setRecordFieldMetaData(...);
RecordMetaData connectionInfo = new RecordMetaDataImpl();
connectionInfo.setName("CONNECTION_INFO");
connectionInfo.setRecordFieldMetaData(...);
2.81.4.4.4. Record field metadata properties 复制链接链接已复制到粘贴板!
A record field metadata object, org.fusesource.camel.component.sap.model.rfc.impl.FieldMetaDataImpl
, specifies the name and type of a parameter field within a structure.
A record field metadata object is similar to a parameter field metadata object, except that the offsets of the individual field locations within the nested structure or table row must be additionally specified. The non-Unicode and Unicode offsets of an individual field must be calculated and specified from the sum of non-Unicode and Unicode byte lengths of the preceding fields in the structure or row.
The failure to properly specify the offsets of fields in nested structures and table rows will cause the field storage of parameters in the underlying JCo and ABAP runtimes to overlap and prevent the proper transfer of values in RFC calls.
For an elementary parameter field (CHAR
, DATE
, BCD
, TIME
, BYTE
, NUM
, FLOAT
, INT
, INT1
, INT2
, DECF16
, DECF34
, STRING
, XSTRING
), the following table lists the configuration properties that may be set on a record field metadata object:
Name | Default Value | Description |
| - | The name of the parameter field. |
| - | The parameter type of the field. |
| - | The field length in bytes for a non-Unicode layout. This value depends on the parameter type. |
| - | The field length in bytes for a Unicode layout. This value depends on the parameter type. |
| - | The field offset in bytes for non-Unicode layout. This offset is the byte location of the field within the enclosing structure. |
| - | The field offset in bytes for Unicode layout. This offset is the byte location of the field within the enclosing structure. |
|
|
The number of decimals in field value; only required for parameter types |
For a complex parameter field of type TABLE
or STRUCTURE
, the following table lists the configuration properties that may be set on a record field metadata object:
Name | Default Value | Description |
| - | The name of the parameter field. |
| - | The parameter type of the field. |
| - | The field offset in bytes for non-Unicode layout. This offset is the byte location of the field within the enclosing structure. |
| - | The field offset in bytes for Unicode layout. This offset is the byte location of the field within the enclosing structure. |
| - |
The metadata for the structure or table. A record metadata object, |
Elementary record field metadata example
The following metadata configuration specifies a DATE
field parameter named ARRDATE
located 85 bytes into the enclosing structure in the case of a non-Unicode layout and located 170 bytes into the enclosing structure in the case of a Unicode layout.
Complex record field metadata example
The following metadata configuration specifies a STRUCTURE
field parameter named FLTINFO
with a structure specified by the flightInfo
record metadata object. The parameter is located at the beginning of the enclosing structure in both the case of a non-Unicode and Unicode layout.
2.81.5. Message Headers 复制链接链接已复制到粘贴板!
The SAP component supports the following message headers:
Header | Description |
|
The URI scheme of the last endpoint to process the message. Use one of the following values:
|
| The destination name of the last destination endpoint to process the message. |
| The server name of the last server endpoint to process the message. |
| The queue name of the last queuing endpoint to process the message. |
| The RFC name of the last RFC endpoint to process the message. |
| The IDoc type of the last IDoc endpoint to process the message. |
| The IDoc type extension, if any, of the last IDoc endpoint to process the message. |
| The system release, if any, of the last IDoc endpoint to process the message. |
| The application release, if any, of the last IDoc endpoint to process the message. |
2.81.6. Exchange Properties 复制链接链接已复制到粘贴板!
The SAP component adds the following exchange properties:
Property | Description |
|
A map containing the properties of each SAP destination encountered by the exchange. The map is keyed by destination name and each entry is a |
|
A map containing the properties of each SAP server encountered by the exchange. The map is keyed by server name and each entry is a |
2.81.7. Message Body for RFC 复制链接链接已复制到粘贴板!
2.81.7.1. Request and response objects 复制链接链接已复制到粘贴板!
An SAP endpoint expects to receive a message with a message body containing an SAP request object and will return a message with a message body containing an SAP response object. SAP requests and responses are fixed map data structures containing named fields with each field having a predefined data type.
Note that the named fields in an SAP request and response are specific to an SAP endpoint, with each endpoint defining the parameters in the SAP request and response it will accept. An SAP endpoint provides factory methods to create the request and response objects that are specific to it.
2.81.7.2. Structure objects 复制链接链接已复制到粘贴板!
Both SAP request and response objects are represented in Java as a structure object which supports the org.fusesource.camel.component.sap.model.rfc.Structure
interface. This interface extends both the java.util.Map
and org.eclipse.emf.ecore.EObject
interfaces.
The field values in a structure object are accessed through the field’s getter methods in the map interface. In addition, the structure interface provides a type-restricted method to retrieve field values.
Structure objects are implemented in the component runtime using the Eclipse Modeling Framework (EMF) and support that framework’s EObject
interface. Instances of a structure object have attached metadata which define and restrict the structure and contents of the map of fields it provides. This metadata can be accessed and introspected using the standard methods provided by EMF. Please refer to the EMF documentation for further details.
Attempts to get a parameter not defined on a structure object will return null. Attempts to set a parameter not defined on a structure will throw an exception as well as attempts to set the value of a parameter with an incorrect type.
As discussed in the following sections, structure objects can contain fields that contain values of the complex field types, STRUCTURE
, and TABLE
.
It is unnecessary to create instances of these types and add them to the structure. Instances of these field values are created on demand if necessary when accessed in the enclosing structure.
2.81.7.3. Field types 复制链接链接已复制到粘贴板!
The fields that reside within the structure object of an SAP request or response may be either elementary or complex. An elementary field contains a single scalar value, whereas a complex field will contain one or more fields of either an elementary or complex type.
2.81.7.3.1. Elementary field types 复制链接链接已复制到粘贴板!
An elementary field may be a character, numeric, hexadecimal or string field type. The following table summarizes the types of elementary fields that may reside in a structure object:
Field Type | Corresponding Java Type | Byte Length | Unicode Byte Length | Number Decimals Digits | Description |
|
| 1 to 65535 | 1 to 65535 | - | ABAP Type ‘C’: Fixed sized character string |
|
| 8 | 16 | - | ABAP Type ‘D’: Date (format: YYYYMMDD) |
|
| 1 to 16 | 1 to 16 | 0 to 14 | ABAP Type ‘P’: Packed BCD number. A BCD number contains two digits per byte. |
|
| 6 | 12 | - | ABAP Type ‘T’: Time (format: HHMMSS) |
|
| 1 to 65535 | 1 to 65535 | - | ABAP Type ‘X’:Fixed sized byte array |
|
| 1 to 65535 | 1 to 65535 | - | ABAP Type ‘N’: Fixed sized numeric character string |
|
| 8 | 8 | 0 to 15 | ABAP Type ‘F’: Floating point number |
|
| 4 | 4 | - | ABAP Type ‘I’: 4-byte Integer |
|
| 2 | 2 | - | ABAP Type ‘S’: 2-byte Integer |
|
| 1 | 1 | - | ABAP Type ‘B’: 1-byte Integer |
|
| 8 | 8 | 16 | ABAP Type ‘decfloat16’: 8 -byte Decimal Floating Point Number |
|
| 16 | 16 | 34 | ABAP Type ‘decfloat34’: 16-byte Decimal Floating Point Number |
|
| 8 | 8 | - | ABAP Type ‘G’: Variable length character string |
|
| 8 | 8 | - | ABAP Type ‘Y’: Variable length byte array |
2.81.7.3.2. Character field types 复制链接链接已复制到粘贴板!
A character field contains a fixed sized character string that may use either a non-Unicode or Unicode character encoding in the underlying JCo and ABAP runtimes. Non-Unicode character strings encode one character per byte. Unicode character strings are encoded in two bytes using UTF-16 encoding. Character field values are represented in Java as java.lang.String
objects and the underlying JCo runtime is responsible for the conversion to their ABAP representation.
A character field declares its field length in its associated byteLength
and unicodeByteLength
properties, which determine the length of the field’s character string in each encoding system.
CHAR
-
A
CHAR
character field is a text field containing alphanumeric characters and corresponds to the ABAP type C. NUM
-
A
NUM
character field is a numeric text field containing numeric characters only and corresponds to the ABAP type N. DATE
-
A
DATE
character field is an 8 character date field with the year, month and day formatted asYYYYMMDD
and corresponds to the ABAP type D. TIME
-
A
TIME
character field is a 6 character time field with the hours, minutes and seconds formatted asHHMMSS
and corresponds to the ABAP type T.
2.81.7.3.3. Numeric field types 复制链接链接已复制到粘贴板!
A numeric field contains a number. The following numeric field types are supported:
INT
-
An
INT
numeric field is an integer field stored as a 4-byte integer value in the underlying JCo and ABAP runtimes and corresponds to the ABAP type I. AnINT
field value is represented in Java as ajava.lang.Integer
object. INT2
-
An
INT2
numeric field is an integer field stored as a 2-byte integer value in the underlying JCo and ABAP runtimes and corresponds to the ABAP type S. AnINT2
field value is represented in Java as ajava.lang.Integer
object. INT1
-
An
INT1
field is an integer field stored as a 1-byte integer value in the underlying JCo and ABAP runtimes value and corresponds to the ABAP type B. AnINT1
field value is represented in Java as ajava.lang.Integer
object. FLOAT
-
A
FLOAT
field is a binary floating point number field stored as an 8-byte double value in the underlying JCo and ABAP runtimes and corresponds to the ABAP type F. AFLOAT
field declares the number of decimal digits that the field’s value contains in its associated decimal property. In the case of aFLOAT
field, this decimal property can have a value between 1 and 15 digits. AFLOAT
field value is represented in Java as ajava.lang.Double
object. BCD
-
A
BCD
field is a binary coded decimal field stored as a 1 to 16 byte packed number in the underlying JCo and ABAP runtimes and corresponds to the ABAP type P. A packed number stores two decimal digits per byte. ABCD
field declares its field length in its associatedbyteLength
andunicodeByteLength
properties. In the case of aBCD
field, these properties can have a value between 1 and 16 bytes, and both properties will have the same value. ABCD
field declares the number of decimal digits that the field’s value contains in its associated decimal property. In the case of aBCD
field, this decimal property can have a value between 1 and 14 digits. ABCD
field value is represented in Java as ajava.math.BigDecimal
. DECF16
-
A
DECF16
field is a decimal floating point stored as an 8-byte IEEE 754 decimal64 floating point value in the underlying JCo and ABAP runtimes and corresponds to the ABAP typedecfloat16
. The value of aDECF16
field has 16 decimal digits. The value of aDECF16
field is represented in Java asjava.math.BigDecimal
. DECF34
-
A
DECF34
field is a decimal floating point stored as a 16-byte IEEE 754 decimal128 floating point value in the underlying JCo and ABAP runtimes and corresponds to the ABAP typedecfloat34
. The value of aDECF34
field has 34 decimal digits. The value of aDECF34
field is represented in Java asjava.math.BigDecimal
.
2.81.7.3.4. Hexadecimal field types 复制链接链接已复制到粘贴板!
A hexadecimal field contains raw binary data. The following hexadecimal field types are supported:
BYTE
-
A
BYTE
field is a fixed sized byte string stored as a byte array in the underlying JCo and ABAP runtimes and corresponds to the ABAP type X. ABYTE
field declares its field length in its associatedbyteLength
andunicodeByteLength
properties. In the case of aBYTE
field, these properties can have a value between 1 and 65535 bytes and both properties will have the same value. The value of aBYTE
field is represented in Java as abyte[]
object.
2.81.7.3.5. String field types 复制链接链接已复制到粘贴板!
A string field references a variable length string value. The length of that string value is not fixed until runtime. The storage for the string value is dynamically created in the underlying JCo and ABAP runtimes. The storage for the string field itself is fixed and contains only a string header.
STRING
-
A
STRING
field refers to a character string stored in the underlying JCo and ABAP runtimes as an 8-byte value. It corresponds to the ABAP type G. The value of theSTRING
field is represented in Java as ajava.lang.String
object. XSTRING
-
An
XSTRING
field refers to a byte string stored in the underlying JCo and ABAP runtimes as an 8-byte value. It corresponds to the ABAP type Y. The value of theSTRING
field is represented in Java as abyte[]
object.
2.81.7.3.6. Complex field types 复制链接链接已复制到粘贴板!
A complex field may be either a structure or table field type. The following table summarizes these complex field types.
Field Type | Corresponding Java Type | Byte Length | Unicode Byte Length | Number Decimals Digits | Description |
|
| Total of individual field byte lengths | Total of individual field Unicode byte lengths | - | ABAP Type ‘u’ & ‘v’: Heterogeneous Structure |
|
| Byte length of row structure | Unicode byte length of row structure | - | ABAP Type ‘h’: Table |
2.81.7.3.7. Structure field types 复制链接链接已复制到粘贴板!
A STRUCTURE
field contains a structure object and is stored in the underlying JCo and ABAP runtimes as an ABAP structure record. It corresponds to either an ABAP type u
or v
. The value of a STRUCTURE
field is represented in Java as a structure object with the interface org.fusesource.camel.component.sap.model.rfc.Structure
.
2.81.7.3.8. Table field types 复制链接链接已复制到粘贴板!
A TABLE
field contains a table object and is stored in the underlying JCo and ABAP runtimes as an ABAP internal table. It corresponds to the ABAP type h
. The value of the field is represented in Java by a table object with the interface org.fusesource.camel.component.sap.model.rfc.Table
.
2.81.7.3.9. Table objects 复制链接链接已复制到粘贴板!
A table object is a homogeneous list data structure containing rows of structure objects with the same structure. This interface extends both the java.util.List
and org.eclipse.emf.ecore.EObject
interfaces.
The list of rows in a table object is accessed and managed using the standard methods defined in the list interface. In addition, the table interface provides two factory methods for creating and adding structure objects to the row list.
Table objects are implemented in the component runtime using the Eclipse Modeling Framework (EMF) and support that framework’s EObject interface. Instances of a table object have attached metadata which define and restrict the structure and contents of the rows it provides. This metadata can be accessed and introspected using the standard methods provided by EMF. Refer to the EMF documentation for further details.
Attempts to add or set a row structure value of the wrong type will throw an exception.
2.81.8. Message Body for IDoc 复制链接链接已复制到粘贴板!
2.81.8.1. IDoc message type 复制链接链接已复制到粘贴板!
When using one of the IDoc Camel SAP endpoints, the type of the message body depends on which particular endpoint you are using.
For a sap-idoc-destination
endpoint or a sap-qidoc-destination
endpoint, the message body is of Document
type:
org.fusesource.camel.component.sap.model.idoc.Document
org.fusesource.camel.component.sap.model.idoc.Document
For a sap-idoclist-destination
endpoint, a sap-qidoclist-destination
endpoint, or a sap-idoclist-server
endpoint, the message body is of DocumentList
type:
org.fusesource.camel.component.sap.model.idoc.DocumentList
org.fusesource.camel.component.sap.model.idoc.DocumentList
2.81.8.2. The IDoc document model 复制链接链接已复制到粘贴板!
For the Camel SAP component, an IDoc document is modeled using the Eclipse Modeling Framework (EMF), which provides a wrapper API around the underlying SAP IDoc API. The most important types in this model are:
org.fusesource.camel.component.sap.model.idoc.Document org.fusesource.camel.component.sap.model.idoc.Segment
org.fusesource.camel.component.sap.model.idoc.Document
org.fusesource.camel.component.sap.model.idoc.Segment
The Document
type represents an IDoc document instance. In outline, the Document
interface exposes the following methods:
The following kinds of method are exposed by the Document
interface:
- Methods for accessing the control record
- Most of the methods are for accessing or modifying field values of the IDoc control record. These methods are of the form AttributeName, where AttributeName is the name of a field value.
- Method for accessing the document contents
The
getRootSegment
method provides access to the document contents (IDoc data records), returning the contents as aSegment
object. EachSegment
object can contain an arbitrary number of child segments, and the segments can be nested to an arbitrary degree.Note, however, that the precise layout of the segment hierarchy is defined by the particular IDoc type of the document. When creating (or reading) a segment hierarchy, therefore, you must be sure to follow the exact structure as defined by the IDoc type.
The Segment
type is used to access the data records of the IDoc document, where the segments are laid out in accordance with the structure defined by the document’s IDoc type. In outline, the Segment
interface exposes the following methods:
The getChildren(String segmentType)
method is particularly useful for adding new (nested) children to a segment. It returns an object of type, SegmentList
, which is defined as follows:
Hence, to create a data record of E1SCU_CRE
type, you could use Java code like the following:
Segment rootSegment = document.getRootSegment(); Segment E1SCU_CRE_Segment = rootSegment.getChildren("E1SCU_CRE").add();
Segment rootSegment = document.getRootSegment();
Segment E1SCU_CRE_Segment = rootSegment.getChildren("E1SCU_CRE").add();
2.81.9. Document attributes 复制链接链接已复制到粘贴板!
IDoc Document Attributes table shows the control record attributes that you can set on the Document
object.
Attribute | Length | SAP Field | Description |
---|---|---|---|
| 70 |
| EDI archive key |
| 3 |
| Client |
| 8 |
| Date IDoc was created |
| 6 |
| Time IDoc was created |
| 1 |
| Direction |
| 14 |
| Reference to message |
| 14 |
| Reference to message group |
| 6 |
| EDI message type |
| 1 |
| EDI standard |
| 6 |
| Version of EDI standard |
| 14 |
| Reference to interchange file |
| 8 |
| IDoc type |
| 16 |
| IDoc number |
| 4 |
| SAP Release of IDoc |
| 30 |
| Name of basic IDoc type |
| 30 |
| Name of extension type |
| 3 |
| Logical message code |
| 3 |
| Logical message function |
| 30 |
| Logical message type |
| 1 |
| Output mode |
| 10 |
| Receiver address (SADR) |
| 70 |
| Logical address of receiver |
| 2 |
| Partner function of receiver |
| 10 |
| Partner number of receiver |
| 2 |
| Partner type of receiver |
| 10 |
| Receiver port (SAP System, EDI subsystem) |
|
| Sender address (SADR) | |
| 70 |
| Logical address of sender |
| 2 |
| Partner function of sender |
| 10 |
| Partner number of sender |
| 2 |
| Partner type of sender |
| 10 |
| Sender port (SAP System, EDI subsystem) |
| 20 |
| EDI/ALE: Serialization field |
| 2 |
| Status of IDoc |
| 1 |
| Test flag |
2.81.9.1. Setting document attributes in Java 复制链接链接已复制到粘贴板!
When setting the control record attributes in Java, the usual convention for Java bean properties is followed. That is, a name
attribute can be accessed through the getName
and setName
methods, for getting and setting the attribute value. For example, the iDocType
, iDocTypeExtension
, and messageType
attributes can be set as follows on a Document
object:
// Java document.setIDocType("FLCUSTOMER_CREATEFROMDATA01"); document.setIDocTypeExtension(""); document.setMessageType("FLCUSTOMER_CREATEFROMDATA");
// Java
document.setIDocType("FLCUSTOMER_CREATEFROMDATA01");
document.setIDocTypeExtension("");
document.setMessageType("FLCUSTOMER_CREATEFROMDATA");
2.81.9.2. Setting document attributes in XML 复制链接链接已复制到粘贴板!
When setting the control record attributes in XML, the attributes must be set on the idoc:Document
element. For example, the iDocType
, iDocTypeExtension
, and messageType
attributes can be set as follows:
2.81.10. Transaction Support 复制链接链接已复制到粘贴板!
2.81.10.1. BAPI transaction model 复制链接链接已复制到粘贴板!
The SAP Component supports the BAPI transaction model for outbound communication with SAP. A destination endpoint with a URL containing the transacted option set to true
will, if necessary, initiate a stateful session on the outbound connection of the endpoint and register a Camel Synchronization object with the exchange. This synchronization object will call the BAPI service method BAPI_TRANSACTION_COMMIT
and end the stateful session when the processing of the message exchange is complete. If the processing of the message exchange fails, the synchronization object will call the BAPI server method BAPI_TRANSACTION_ROLLBACK
and end the stateful session.
2.81.10.2. RFC transaction model 复制链接链接已复制到粘贴板!
The tRFC protocol accomplishes an AT-MOST-ONCE delivery and processing guarantee by identifying each transactional request with a unique transaction identifier (TID). A TID accompanies each request sent in the protocol. A sending application using the tRFC protocol must identify each instance of a request with a unique TID when sending the request. An application may send a request with a given TID multiple times, but the protocol ensures that the request is delivered and processed in the receiving system at most once. An application may choose to resend a request with a given TID when encountering a communication or system error when sending the request, and is thus in doubt whether that request was delivered and processed in the receiving system. By resending a request when encountering a communication error, a client application using the tRFC protocol can thus ensure EXACTLY-ONCE delivery and processing guarantees for its request.
2.81.10.3. Which transaction model to use? 复制链接链接已复制到粘贴板!
A BAPI transaction is an application level transaction, in the sense that it imposes ACID guarantees on the persistent data changes performed by a BAPI method or RFC function in the SAP database. An RFC transaction is a communication transaction, in the sense that it imposes delivery guarantees (AT-MOST-ONCE, EXACTLY-ONCE, EXACTLY-ONCE-IN-ORDER) on requests to a BAPI method and/or RFC function.
2.81.10.4. Transactional RFC destination endpoints 复制链接链接已复制到粘贴板!
The following destination endpoints support RFC transactions:
-
sap-trfc-destination
-
sap-qrfc-destination
A single Camel route can include multiple transactional RFC destination endpoints, sending messages to multiple RFC destinations and even sending messages to the same RFC destination multiple times. This implies that the Camel SAP component potentially needs to keep track of many transaction IDs (TIDs) for each Exchange
object passing along a route. Now if the route processing fails and must be retried, the situation gets quite complicated. The RFC transaction semantics demand that each RFC destination along the route must be invoked using the same TID that was used the first time around (and where the TIDs for each destination are distinct from each other). In other words, the Camel SAP component must keep track of which TID was used at which point along the route, and remember this information, so that the TIDs can be replayed in the correct order.
By default, Camel does not provide a mechanism that enables an Exchange
to know where it is in a route. To provide such a mechanism, it is necessary to install the CurrentProcessorDefinitionInterceptStrategy
interceptor into the Camel runtime. This interceptor must be installed into the Camel runtime, in order for the Camel SAP component to keep track of the TIDs in a route.
2.81.10.5. Transactional RFC server endpoints 复制链接链接已复制到粘贴板!
The following server endpoints support RFC transactions:
-
sap-trfc-server
When a Camel exchange processing a transactional request encounters a processing error, Camel handles the processing error through its standard error handling mechanisms. If the Camel route processing the exchange is configured to propagate the error back to the caller, the SAP server endpoint that initiated the exchange takes note of the failure and the sending SAP system is notified of the error. The sending SAP system can then respond by sending another transaction request with the same TID to process the request again.
2.81.11. XML Serialization for RFC 复制链接链接已复制到粘贴板!
SAP request and response objects support an XML serialization format which enable these objects to be serialized to and from an XML document.
2.81.11.1. XML namespace 复制链接链接已复制到粘贴板!
Each RFC in a repository defines a specific XML namespace for the elements which compose the serialized forms of its Request and Response objects. The form of this namespace URL is as follows:
http://sap.fusesource.org/rfc>/<Repository Name>/<RFC Name>
http://sap.fusesource.org/rfc>/<Repository Name>/<RFC Name>
RFC namespace URLs have a common http://sap.fusesource.org/rfc
prefix followed by the name of the repository in which the RFC’s metadata is defined. The final component in the URL is the name of the RFC itself.
2.81.11.2. Request and response XML documents 复制链接链接已复制到粘贴板!
An SAP request object will be serialized into an XML document with the root element of that document named Request and scoped by the namespace of the request’s RFC.
<?xml version="1.0" encoding="ASCII"?> <BOOK_FLIGHT:Request xmlns:BOOK_FLIGHT="http://sap.fusesource.org/rfc/nplServer/BOOK_FLIGHT"> ... </BOOK_FLIGHT:Request>
<?xml version="1.0" encoding="ASCII"?>
<BOOK_FLIGHT:Request
xmlns:BOOK_FLIGHT="http://sap.fusesource.org/rfc/nplServer/BOOK_FLIGHT">
...
</BOOK_FLIGHT:Request>
An SAP response object will be serialized into an XML document with the root element of that document named Response and scoped by the namespace of the response’s RFC.
<?xml version="1.0" encoding="ASCII"?> <BOOK_FLIGHT:Response xmlns:BOOK_FLIGHT="http://sap.fusesource.org/rfc/nplServer/BOOK_FLIGHT"> ... </BOOK_FLIGHT:Response>
<?xml version="1.0" encoding="ASCII"?>
<BOOK_FLIGHT:Response
xmlns:BOOK_FLIGHT="http://sap.fusesource.org/rfc/nplServer/BOOK_FLIGHT">
...
</BOOK_FLIGHT:Response>
2.81.11.3. Structure fields 复制链接链接已复制到粘贴板!
Structure fields in parameter lists or nested structures are serialized as elements. The element name of the serialized structure corresponds to the field name of the structure within the enclosing parameter list, structure or table row entry it resides.
<BOOK_FLIGHT:FLTINFO xmlns:BOOK_FLIGHT="http://sap.fusesource.org/rfc/nplServer/BOOK_FLIGHT"> ... </BOOK_FLIGHT:FLTINFO>
<BOOK_FLIGHT:FLTINFO
xmlns:BOOK_FLIGHT="http://sap.fusesource.org/rfc/nplServer/BOOK_FLIGHT">
...
</BOOK_FLIGHT:FLTINFO>
Note that the type name of the structure element in the RFC namespace will correspond to the name of the record metadata object which defines the structure, as in the following example:
This distinction will be important when specifying a JAXB bean to marshal and unmarshal the structure.
2.81.11.4. Table fields 复制链接链接已复制到粘贴板!
Table fields in parameter lists or nested structures are serialized as elements. The element name of the serialized structure will correspond to the field name of the table within the enclosing parameter list, structure, or table row entry it resides. The table element will contain a series of row elements to hold the serialized values of the table’s row entries.
Note that the type name of the table element in the RFC namespace corresponds to the name of the record metadata object which defines the row structure of the table suffixed by _TABLE
. The type name of the table row element in the RFC name corresponds to the name of the record metadata object which defines the row structure of the table, as in the following example:
This distinction will be important when specifying a JAXB bean to marshal and unmarshal the structure.
2.81.11.5. Elementary fields 复制链接链接已复制到粘贴板!
Elementary fields in parameter lists or nested structures are serialized as attributes on the element of the enclosing parameter list or structure. The attribute name of the serialized field corresponds to the field name of the field within the enclosing parameter list, structure, or table row entry it resides, as in the following example:
2.81.11.6. Date and time formats 复制链接链接已复制到粘贴板!
Date and Time fields are serialized into attribute values using the following format:
yyyy-MM-dd'T'HH:mm:ss.SSSZ
yyyy-MM-dd'T'HH:mm:ss.SSSZ
Date fields will be serialized with only the year, month, day and timezone components set:
DEPDATE="2014-03-19T00:00:00.000-0400"
DEPDATE="2014-03-19T00:00:00.000-0400"
Time fields will be serialized with only the hour, minute, second, millisecond and timezone components set:
DEPTIME="1970-01-01T16:00:00.000-0500"
DEPTIME="1970-01-01T16:00:00.000-0500"
2.81.12. XML Serialization for IDoc 复制链接链接已复制到粘贴板!
An IDoc message body can be serialized into an XML string format, with the help of a built-in type converter.
2.81.12.1. XML namespace 复制链接链接已复制到粘贴板!
Each serialized IDoc is associated with an XML namespace, which has the following general format:
http://sap.fusesource.org/idoc/repositoryName/idocType/idocTypeExtension/systemRelease/applicationRelease
http://sap.fusesource.org/idoc/repositoryName/idocType/idocTypeExtension/systemRelease/applicationRelease
Both the repositoryName (name of the remote SAP metadata repository) and the idocType (IDoc document type) are mandatory, but the other components of the namespace can be left blank. For example, you could have an XML namespace like the following:
http://sap.fusesource.org/idoc/MY_REPO/FLCUSTOMER_CREATEFROMDATA01///
http://sap.fusesource.org/idoc/MY_REPO/FLCUSTOMER_CREATEFROMDATA01///
2.81.12.2. Built-in type converter 复制链接链接已复制到粘贴板!
The Camel SAP component has a built-in type converter, which is capable of converting a Document
object or a DocumentList
object to and from a String
type.
For example, to serialize a Document
object to an XML string, you can simply add the following line to a route in XML DSL:
<convertBodyTo type="java.lang.String">;
<convertBodyTo type="java.lang.String">;
You can also use this approach to a serialized XML message into a Document
object. For example, given that the current message body is a serialized XML string, you can convert it back into a Document
object by adding the following line to a route in XML DSL:
<convertBodyTo type="org.fusesource.camel.component.sap.model.idoc.Document">
<convertBodyTo type="org.fusesource.camel.component.sap.model.idoc.Document">
2.81.12.3. Sample IDoc message body in XML format 复制链接链接已复制到粘贴板!
When you convert an IDoc message to a String
, it is serialized into an XML document, where the root element is either idoc:Document
(for a single document) or idoc:DocumentList
(for a list of documents). It shows that a single IDoc document that has been serialized to an idoc:Document
element.
Example 2.2. IDoc Message Body in XML
2.81.13. Example 1: Reading Data from SAP 复制链接链接已复制到粘贴板!
This example demonstrates a route that reads FlightCustomer
business object data from SAP. The route invokes the FlightCustomer
BAPI method, BAPI_FLCUST_GETLIST
, using an SAP synchronous RFC destination endpoint to retrieve the data.
2.81.13.1. Java DSL for route 复制链接链接已复制到粘贴板!
The Java DSL for the example route is as follows:
from("direct:getFlightCustomerInfo") .to("bean:createFlightCustomerGetListRequest") .to("sap-srfc-destination:nplDest:BAPI_FLCUST_GETLIST") .to("bean:returnFlightCustomerInfo");
from("direct:getFlightCustomerInfo")
.to("bean:createFlightCustomerGetListRequest")
.to("sap-srfc-destination:nplDest:BAPI_FLCUST_GETLIST")
.to("bean:returnFlightCustomerInfo");
2.81.13.2. XML DSL for route 复制链接链接已复制到粘贴板!
And the Spring DSL for the same route is as follows:
2.81.13.3. createFlightCustomerGetListRequest bean 复制链接链接已复制到粘贴板!
The createFlightCustomerGetListRequest
bean is responsible for building an SAP request object in its exchange method that is used in the RFC call of the subsequent SAP endpoint. The following code snippet demonstrates the sequence of operations to build the request object:
2.81.13.4. returnFlightCustomerInfo bean 复制链接链接已复制到粘贴板!
The returnFlightCustomerInfo
bean is responsible for extracting data from the SAP response object in its exchange method that it receives from the previous SAP endpoint. The following code snippet demonstrates the sequence of operations to extract the data from the response object:
2.81.14. Example 2: Writing Data to SAP 复制链接链接已复制到粘贴板!
This example demonstrates a route that creates a FlightTrip
business object instance in SAP. The route invokes the FlightTrip
BAPI method, BAPI_FLTRIP_CREATE
, using a destination endpoint to create the object.
2.81.14.1. Java DSL for route 复制链接链接已复制到粘贴板!
The Java DSL for the example route is as follows:
from("direct:createFlightTrip") .to("bean:createFlightTripRequest") .to("sap-srfc-destination:nplDest:BAPI_FLTRIP_CREATE?transacted=true") .to("bean:returnFlightTripResponse");
from("direct:createFlightTrip")
.to("bean:createFlightTripRequest")
.to("sap-srfc-destination:nplDest:BAPI_FLTRIP_CREATE?transacted=true")
.to("bean:returnFlightTripResponse");
2.81.14.2. XML DSL for route 复制链接链接已复制到粘贴板!
And the Spring DSL for the same route is as follows:
2.81.14.3. Transaction support 复制链接链接已复制到粘贴板!
Note that the URL for the SAP endpoint has the transacted
option set to true
. When this option is enabled, the endpoint ensures that an SAP transaction session has been initiated before invoking the RFC call. Because this endpoint’s RFC creates new data in SAP, this option is necessary to make the route’s changes permanent in SAP.
2.81.14.4. Populating request parameters 复制链接链接已复制到粘贴板!
The createFlightTripRequest
and returnFlightTripResponse
beans are responsible for populating request parameters into the SAP request and extracting response parameters from the SAP response respectively, following the same sequence of operations as demonstrated in the previous example.
2.81.15. Example 3: Handling Requests from SAP 复制链接链接已复制到粘贴板!
This example demonstrates a route which handles a request from SAP to the BOOK_FLIGHT
RFC, which is implemented by the route. In addition, it demonstrates the component’s XML serialization support, using JAXB to unmarshal and marshal SAP request objects and response objects to custom beans.
This route creates a FlightTrip
business object on behalf of a travel agent, FlightCustomer
. The route first unmarshals the SAP request object received by the SAP server endpoint into a custom JAXB bean. This custom bean is then multicasted in the exchange to three sub-routes, which gather the travel agent, flight connection, and passenger information required to create the flight trip. The final sub-route creates the flight trip object in SAP, as demonstrated in the previous example. The final sub-route also creates and returns a custom JAXB bean which is marshaled into an SAP response object and returned by the server endpoint.
2.81.15.1. Java DSL for route 复制链接链接已复制到粘贴板!
The Java DSL for the example route is as follows:
2.81.15.2. XML DSL for route 复制链接链接已复制到粘贴板!
And the XML DSL for the same route is as follows:
2.81.15.3. BookFlightRequest bean 复制链接链接已复制到粘贴板!
The following listing illustrates a JAXB bean which unmarshals from the serialized form of an SAP BOOK_FLIGHT
request object:
2.81.15.4. BookFlightResponse bean 复制链接链接已复制到粘贴板!
The following listing illustrates a JAXB bean which marshals to the serialized form of an SAP BOOK_FLIGHT
response object:
The complex parameter fields of the response object are serialized as child elements of the response.
2.81.15.5. FlightInfo bean 复制链接链接已复制到粘贴板!
The following listing illustrates a JAXB bean which marshals to the serialized form of the complex structure parameter FLTINFO
:
2.81.15.6. ConnectionInfoTable bean 复制链接链接已复制到粘贴板!
The following listing illustrates a JAXB bean which marshals to the serialized form of the complex table parameter, CONNINFO
. Note that the name of the root element type of the JAXB bean corresponds to the name of the row structure type suffixed with _TABLE
and the bean contains a list of row elements.
2.81.15.7. ConnectionInfo bean 复制链接链接已复制到粘贴板!
The following listing illustrates a JAXB bean, which marshals to the serialized form of the above tables row elements:
2.82. XQuery 复制链接链接已复制到粘贴板!
Query and/or transform XML payloads using XQuery and Saxon.
2.82.1. What’s inside 复制链接链接已复制到粘贴板!
-
XQuery component, URI syntax:
xquery:resourceUri
- XQuery language
Refer to the above links for usage and configuration details.
2.82.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-saxon</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-saxon</artifactId>
</dependency>
2.82.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
This component is able to load XQuery definitions from classpath. To make it work also in native mode, you need to explicitly embed the queries in the native executable by using the quarkus.native.resources.includes
property.
For instance, the two routes below load an XQuery script from two classpath resources named myxquery.txt
and another-xquery.txt
respectively:
from("direct:start").transform().xquery("resource:classpath:myxquery.txt", String.class); from("direct:start").to("xquery:another-xquery.txt");
from("direct:start").transform().xquery("resource:classpath:myxquery.txt", String.class);
from("direct:start").to("xquery:another-xquery.txt");
To include these (an possibly other queries stored in .txt
files) in the native image, you would have to add something like the following to your application.properties
file:
quarkus.native.resources.includes = *.txt
quarkus.native.resources.includes = *.txt
2.83. Scheduler 复制链接链接已复制到粘贴板!
Generate messages in specified intervals using java.util.concurrent.ScheduledExecutorService.
2.83.1. What’s inside 复制链接链接已复制到粘贴板!
-
Scheduler component, URI syntax:
scheduler:name
Refer to the above link for usage and configuration details.
2.83.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-scheduler</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-scheduler</artifactId>
</dependency>
2.84. SEDA 复制链接链接已复制到粘贴板!
Asynchronously call another endpoint from any Camel Context in the same JVM.
2.84.1. What’s inside 复制链接链接已复制到粘贴板!
-
SEDA component, URI syntax:
seda:name
Refer to the above link for usage and configuration details.
2.84.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-seda</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-seda</artifactId>
</dependency>
2.85. Slack 复制链接链接已复制到粘贴板!
Send and receive messages to/from Slack.
2.85.1. What’s inside 复制链接链接已复制到粘贴板!
-
Slack component, URI syntax:
slack:channel
Refer to the above link for usage and configuration details.
2.85.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-slack</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-slack</artifactId>
</dependency>
2.85.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.86. SNMP 复制链接链接已复制到粘贴板!
Receive traps and poll SNMP (Simple Network Management Protocol) capable devices.
2.86.1. What’s inside 复制链接链接已复制到粘贴板!
-
SNMP component, URI syntax:
snmp:host:port
Refer to the above link for usage and configuration details.
2.86.2. Maven coordinates 复制链接链接已复制到粘贴板!
<dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-snmp</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-snmp</artifactId>
</dependency>
2.87. SOAP dataformat 复制链接链接已复制到粘贴板!
Marshal Java objects to SOAP messages and back.
2.87.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.87.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-soap</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-soap</artifactId>
</dependency>
2.88. Splunk 复制链接链接已复制到粘贴板!
Publish or search for events in Splunk.
2.88.1. What’s inside 复制链接链接已复制到粘贴板!
-
Splunk component, URI syntax:
splunk:name
Refer to the above link for usage and configuration details.
2.88.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-splunk</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-splunk</artifactId>
</dependency>
2.88.3. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.89. SQL 复制链接链接已复制到粘贴板!
Perform SQL queries.
2.89.1. What’s inside 复制链接链接已复制到粘贴板!
-
SQL component, URI syntax:
sql:query
-
SQL Stored Procedure component, URI syntax:
sql-stored:template
Refer to the above links for usage and configuration details.
2.89.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-sql</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-sql</artifactId>
</dependency>
2.89.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.89.3.1. Configuring a DataSource 复制链接链接已复制到粘贴板!
This extension leverages Quarkus Agroal for DataSource
support. Setting up a DataSource
can be achieved via configuration properties.
quarkus.datasource.db-kind=postgresql quarkus.datasource.username=your-username quarkus.datasource.password=your-password quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/your-database quarkus.datasource.jdbc.max-size=16
quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=your-username
quarkus.datasource.password=your-password
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/your-database
quarkus.datasource.jdbc.max-size=16
The Camel SQL component will automatically resolve the DataSource
bean from the registry. When configuring multiple datasources, you can specify which one is to be used on an SQL endpoint via the URI options datasource
or dataSourceRef
. Refer to the SQL component documentation for more details.
2.89.3.1.1. Zero configuration with Quarkus Dev Services 复制链接链接已复制到粘贴板!
In dev and test mode you can take advantage of Configuration Free Databases. The Camel SQL component will be automatically configured to use a DataSource
that points to a local containerized instance of the database matching the JDBC driver type that you have selected.
2.89.3.2. SQL scripts 复制链接链接已复制到粘贴板!
When configuring sql
or sql-stored
endpoints to reference script files from the classpath, set the following configuration property to ensure that they are available in native mode.
quarkus.native.resources.includes = queries.sql, sql/*.sql
quarkus.native.resources.includes = queries.sql, sql/*.sql
2.89.3.3. SQL aggregation repository in native mode 复制链接链接已复制到粘贴板!
In order to use SQL aggregation repositories like JdbcAggregationRepository
in native mode, you must enable native serialization support.
In addition, if your exchange bodies are custom types, they must be registered for serialization by annotating their class declaration with @RegisterForReflection(serialization = true)
.
2.90. Telegram 复制链接链接已复制到粘贴板!
Send and receive messages acting as a Telegram Bot Telegram Bot API.
2.90.1. What’s inside 复制链接链接已复制到粘贴板!
-
Telegram component, URI syntax:
telegram:type
Refer to the above link for usage and configuration details.
2.90.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-telegram</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-telegram</artifactId>
</dependency>
2.90.3. Usage 复制链接链接已复制到粘贴板!
2.90.4. Webhook Mode 复制链接链接已复制到粘贴板!
The Telegram extension supports usage in the webhook mode.
In order to enable webhook mode, you must add a REST implementation to your application. Maven users, for example, can add the camel-quarkus-rest extension to their pom.xml
file:
<dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-rest</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-rest</artifactId>
</dependency>
2.90.5. SSL in native mode 复制链接链接已复制到粘贴板!
This extension auto-enables SSL support in native mode. Hence you do not need to add quarkus.ssl.native=true
to your application.properties
yourself. See also Quarkus SSL guide.
2.91. Timer 复制链接链接已复制到粘贴板!
Generate messages in specified intervals using java.util.Timer.
2.91.1. What’s inside 复制链接链接已复制到粘贴板!
-
Timer component, URI syntax:
timer:timerName
Refer to the above link for usage and configuration details.
2.91.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-timer</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-timer</artifactId>
</dependency>
2.92. Validator 复制链接链接已复制到粘贴板!
Validate the payload using XML Schema and JAXP Validation.
2.92.1. What’s inside 复制链接链接已复制到粘贴板!
-
Validator component, URI syntax:
validator:resourceUri
Refer to the above link for usage and configuration details.
2.92.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-validator</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-validator</artifactId>
</dependency>
2.93. Velocity 复制链接链接已复制到粘贴板!
Transform messages using a Velocity template.
2.93.1. What’s inside 复制链接链接已复制到粘贴板!
-
Velocity component, URI syntax:
velocity:resourceUri
Refer to the above link for usage and configuration details.
2.93.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-velocity</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-velocity</artifactId>
</dependency>
2.93.3. Usage 复制链接链接已复制到粘贴板!
When using a custom object as message body and referencing its properties in the template in the native mode, all the classes need to be registered for reflection (see the documentation).
Example:
@RegisterForReflection public interface CustomBody { }
@RegisterForReflection
public interface CustomBody {
}
2.93.4. allowContextMapAll option in native mode 复制链接链接已复制到粘贴板!
The allowContextMapAll
option is not supported in native mode as it requires reflective access to security sensitive camel core classes such as CamelContext
& Exchange
. This is considered a security risk and thus access to the feature is not provided by default.
2.93.5. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
This component typically loads Velocity templates from classpath. To make it work also in native mode, you need to explicitly embed the templates in the native executable by using the quarkus.native.resources.includes
property.
For instance, the route below would load the Velocity template from a classpath resource named template/simple.vm
:
from("direct:start").to("velocity://template/simple.vm");
from("direct:start").to("velocity://template/simple.vm");
To include this (an possibly other templates stored in .vm
files in the template
directory) in the native image, you would have to add something like the following to your application.properties
file:
quarkus.native.resources.includes = template/*.vm
quarkus.native.resources.includes = template/*.vm
2.94. Vert.x HTTP Client 复制链接链接已复制到粘贴板!
Camel HTTP client support with Vert.x
2.94.1. What’s inside 复制链接链接已复制到粘贴板!
-
Vert.x HTTP Client component, URI syntax:
vertx-http:httpUri
Refer to the above link for usage and configuration details.
2.94.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-vertx-http</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-vertx-http</artifactId>
</dependency>
2.94.3. transferException option in native mode 复制链接链接已复制到粘贴板!
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)
2.94.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.94.5. allowJavaSerializedObject option in native mode 复制链接链接已复制到粘贴板!
When using the allowJavaSerializedObject
option in native mode, the support of serialization might need to be enabled. Please, refer to the native mode user guide for more information.
2.94.5.1. Character encodings 复制链接链接已复制到粘贴板!
Check the Character encodings section of the Native mode guide if the application is expected to send and receive requests using non-default encodings.
2.95. Vert.x WebSocket 复制链接链接已复制到粘贴板!
This extension enables you to create WebSocket endpoints to that act as either a WebSocket server, or as a client to connect an existing WebSocket .
It is built on top of the Eclipse Vert.x HTTP server provided by the quarkus-vertx-http
extension.
2.95.1. What’s inside 复制链接链接已复制到粘贴板!
-
Vert.x WebSocket component, URI syntax:
vertx-websocket:host:port/path
Refer to the above link for usage and configuration details.
2.95.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-vertx-websocket</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-vertx-websocket</artifactId>
</dependency>
2.95.3. Usage 复制链接链接已复制到粘贴板!
2.95.3.1. Vert.x WebSocket consumers 复制链接链接已复制到粘贴板!
When you create a Vert.x WebSocket consumer (E.g with from("vertx-websocket")
), the host and port configuration in the URI are redundant since the WebSocket will always be hosted on the Quarkus HTTP server.
The configuration of the consumer can be simplified to only include the resource path of the WebSocket. For example.
from("vertx-websocket:/my-websocket-path") .setBody().constant("Hello World");
from("vertx-websocket:/my-websocket-path")
.setBody().constant("Hello World");
While you do not need to explicitly configure the host/port on the vertx-websocket consumer. If you choose to, the host & port must exactly match the value of the Quarkus HTTP server configuration values for quarkus.http.host
and quarkus.http.port
. Otherwise an exception will be thrown at runtime.
2.95.3.2. Vert.x WebSocket producers 复制链接链接已复制到粘贴板!
Similar to above, if you want to produce messages to the internal Vert.x WebSocket consumer, then you can omit the host and port from the endpoint URI.
from("vertx-websocket:/my-websocket-path") .log("Got body: ${body}"); from("direct:sendToWebSocket") .log("vertx-websocket:/my-websocket-path");
from("vertx-websocket:/my-websocket-path")
.log("Got body: ${body}");
from("direct:sendToWebSocket")
.log("vertx-websocket:/my-websocket-path");
Or alternatively, you can refer to the full host & port configuration for the Quarkus HTTP server.
from("direct:sendToWebSocket") .log("vertx-websocket:{{quarkus.http.host}}:{{quarkus.http.port}}/my-websocket-path");
from("direct:sendToWebSocket")
.log("vertx-websocket:{{quarkus.http.host}}:{{quarkus.http.port}}/my-websocket-path");
When producing messages to an external WebSocket server, then you must always provide the host name and port (if required).
2.95.4. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.95.4.1. Vert.x WebSocket server configuration 复制链接链接已复制到粘贴板!
Configuration of the Vert.x WebSocket server is managed by Quarkus. Refer to the Quarkus HTTP configuration guide for the full list of configuration options.
To configure SSL for the Vert.x WebSocket server, follow the secure connections with SSL guide. Note that configuring the server for SSL with SSLContextParameters
is not currently supported.
2.95.4.2. Character encodings 复制链接链接已复制到粘贴板!
Check the Character encodings section of the Native mode guide if you expect your application to send or receive requests using non-default encodings.
2.96. XML IO DSL 复制链接链接已复制到粘贴板!
An XML stack for parsing XML route definitions
2.96.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.96.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-xml-io-dsl</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xml-io-dsl</artifactId>
</dependency>
2.96.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
2.96.3.1. XML file encodings 复制链接链接已复制到粘贴板!
By default, some XML file encodings may not work out of the box in native mode. Please, check the Character encodings section to learn how to fix.
2.97. XML JAXP 复制链接链接已复制到粘贴板!
XML JAXP type converters and parsers
2.97.1. Maven coordinates 复制链接链接已复制到粘贴板!
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-xml-jaxp</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xml-jaxp</artifactId>
</dependency>
2.98. XPath 复制链接链接已复制到粘贴板!
Evaluates an XPath expression against an XML payload
2.98.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.98.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-xpath</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xpath</artifactId>
</dependency>
2.98.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
This component is able to load xpath expressions from classpath resources. To make it work also in native mode, you need to explicitly embed the expression files in the native executable by using the quarkus.native.resources.includes
property.
For instance, the route below would load an XPath expression from a classpath resource named myxpath.txt
:
from("direct:start").transform().xpath("resource:classpath:myxpath.txt");
from("direct:start").transform().xpath("resource:classpath:myxpath.txt");
To include this (an possibly other expressions stored in .txt
files) in the native image, you would have to add something like the following to your application.properties
file:
quarkus.native.resources.includes = *.txt
quarkus.native.resources.includes = *.txt
2.99. XSLT Saxon 复制链接链接已复制到粘贴板!
Transform XML payloads using an XSLT template using Saxon.
2.99.1. What’s inside 复制链接链接已复制到粘贴板!
-
XSLT Saxon component, URI syntax:
xslt-saxon:resourceUri
Refer to the above link for usage and configuration details.
2.99.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-xslt-saxon</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xslt-saxon</artifactId>
</dependency>
2.100. XSLT 复制链接链接已复制到粘贴板!
Transforms XML payload using an XSLT template.
2.100.1. What’s inside 复制链接链接已复制到粘贴板!
-
XSLT component, URI syntax:
xslt:resourceUri
Refer to the above link for usage and configuration details.
2.100.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-xslt</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-xslt</artifactId>
</dependency>
2.100.3. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
To optimize XSLT processing, the extension needs to know the locations of the XSLT templates at build time. The XSLT source URIs have to be passed via the quarkus.camel.xslt.sources
property. Multiple URIs can be separated by comma.
quarkus.camel.xslt.sources = transform.xsl, classpath:path/to/my/file.xsl
quarkus.camel.xslt.sources = transform.xsl, classpath:path/to/my/file.xsl
Scheme-less URIs are interpreted as classpath:
URIs.
Only classpath:
URIs are supported on Quarkus native mode. file:
, http:
and other kinds of URIs can be used on JVM mode only.
<xsl:include>
and <xsl:messaging>
XSLT elements are also supported in JVM mode only right now.
If aggregate
DSL is used, XsltSaxonAggregationStrategy
has to be used such as
Also, it’s only supported on JVM mode.
2.100.3.1. Configuration 复制链接链接已复制到粘贴板!
TransformerFactory features can be configured using following property:
quarkus.camel.xslt.features."http\://javax.xml.XMLConstants/feature/secure-processing"=false
quarkus.camel.xslt.features."http\://javax.xml.XMLConstants/feature/secure-processing"=false
2.100.3.2. Extension functions support 复制链接链接已复制到粘贴板!
Xalan’s extension functions do work properly only when:
- Secure-processing is disabled
- Functions are defined in a separate jar
- Functions are augmented during native build phase. For example, they can be registered for reflection:
@RegisterForReflection(targets = { my.Functions.class }) public class FunctionsConfiguration { }
@RegisterForReflection(targets = { my.Functions.class })
public class FunctionsConfiguration {
}
The content of the XSLT source URIs is parsed and compiled into Java classes at build time. These Java classes are the only source of XSLT information at runtime. The XSLT source files may not be included in the application archive at all.
Configuration property | Type | Default |
---|---|---|
A comma separated list of templates to compile. |
| |
The package name for the generated classes. |
|
|
TransformerFactory features. |
|
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.
2.101. YAML DSL 复制链接链接已复制到粘贴板!
An YAML stack for parsing YAML route definitions
2.101.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.101.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-yaml-dsl</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-yaml-dsl</artifactId>
</dependency>
2.101.3. Usage 复制链接链接已复制到粘贴板!
2.101.3.1. Native mode 复制链接链接已复制到粘贴板!
The following constructs when defined within Camel YAML DSL markup, require you to register classes for reflection. Refer to the Native mode guide for details.
2.101.3.1.1. Bean definitions 复制链接链接已复制到粘贴板!
The YAML DSL provides the capability to define beans as follows.
In this example, the GreetingBean
class needs to be registered for reflection. This applies to any types that you refer to under the beans
key in your YAML routes.
@RegisterForReflection public class GreetingBean { }
@RegisterForReflection
public class GreetingBean {
}
2.101.3.1.2. Exception handling 复制链接链接已复制到粘贴板!
Camel provides various methods of handling exceptions. Some of these require that any exception classes referenced in their DSL definitions are registered for reflection.
on-exception
@RegisterForReflection public class MyHandledException { }
@RegisterForReflection
public class MyHandledException {
}
throw-exception
@RegisterForReflection public class ForcedException { }
@RegisterForReflection
public class ForcedException {
}
do-catch
@RegisterForReflection(targets = FileNotFoundException.class) public class MyClass { }
@RegisterForReflection(targets = FileNotFoundException.class)
public class MyClass {
}
2.102. Zip Deflate Compression 复制链接链接已复制到粘贴板!
Compress and decompress streams using java.util.zip.Deflater, java.util.zip.Inflater or java.util.zip.GZIPStream.
2.102.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above links for usage and configuration details.
2.102.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-zip-deflater</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-zip-deflater</artifactId>
</dependency>
2.103. Zip File 复制链接链接已复制到粘贴板!
Compression and decompress streams using java.util.zip.ZipStream.
2.103.1. What’s inside 复制链接链接已复制到粘贴板!
Refer to the above link for usage and configuration details.
2.103.2. Maven coordinates 复制链接链接已复制到粘贴板!
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-zipfile</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-zipfile</artifactId>
</dependency>