This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 7ce2f5c Regen for commit 38c69619c55ca70c7bf88188ae02740e94b13cf9 7ce2f5c is described below commit 7ce2f5c9af5160a53d5eff8c6109599c2e1bde6f Author: davsclaus <davscl...@users.noreply.github.com> AuthorDate: Fri Aug 6 16:17:57 2021 +0000 Regen for commit 38c69619c55ca70c7bf88188ae02740e94b13cf9 Signed-off-by: GitHub <nore...@github.com> --- .../catalog/docs/azure-servicebus-component.adoc | 295 --------------------- .../camel/catalog/docs/disruptor-vm-component.adoc | 2 + .../camel/catalog/docs/hwcloud-obs-component.adoc | 281 -------------------- .../modules/ROOT/pages/disruptor-vm-component.adoc | 2 + 4 files changed, 4 insertions(+), 576 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-servicebus-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-servicebus-component.adoc deleted file mode 100644 index 1c31448..0000000 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-servicebus-component.adoc +++ /dev/null @@ -1,295 +0,0 @@ -[[azure-servicebus-component]] -= Azure ServiceBus Component -:docTitle: Azure ServiceBus -:artifactId: camel-azure-servicebus -:description: The azure-servicebus component that integrates Azure ServiceBus. Azure ServiceBus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. Data is transferred between different applications and services using messages. -:since: 3.12 -:supportLevel: Preview -:component-header: Both producer and consumer are supported -include::{cq-version}@camel-quarkus:ROOT:partial$reference/components/azure-servicebus.adoc[opts=optional] -//Manually maintained attributes -:group: Azure - -*Since Camel {since}* - -*{component-header}* - -The azure-servicebus component that integrates https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview[Azure ServiceBus]. Azure ServiceBus is a fully managed enterprise -integration message broker. Service Bus can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. Data is transferred between different applications and - services using messages. - -Prerequisites - -You must have a valid Windows Azure Storage account. More information is available at -https://docs.microsoft.com/azure/[Azure Documentation Portal]. - -[source,xml] ------------------------------------------------------------- -<dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-azure-servicebus</artifactId> - <version>x.x.x</version> - <!-- use the same version as your Camel core version --> -</dependency> ------------------------------------------------------------- - - -// component-configure options: START -== Configuring Options - -Camel components are configured on two separate levels: - -- component level -- endpoint level - -=== Configuring Component Options - -The component level is the highest level which holds general and common configurations that are inherited by the endpoints. -For example a component may have security settings, credentials for authentication, urls for network connection and so forth. - -Some components only have a few options, and others may have many. Because components typically have pre configured defaults -that are commonly used, then you may often only need to configure a few options on a component; or none at all. - -Configuring components can be done with the xref:latest@manual::component-dsl.adoc[Component DSL], -in a configuration file (application.properties|yaml), or directly with Java code. - -=== Configuring Endpoint Options - -Where you find yourself configuring the most is on endpoints, as endpoints often have many options, which allows you to -configure what you need the endpoint to do. The options are also categorized into whether the endpoint is used as consumer (from) -or as a producer (to), or used for both. - -Configuring endpoints is most often done directly in the endpoint URI as path and query parameters. You can also use -the xref:latest@manual::Endpoint-dsl.adoc[Endpoint DSL] as a _type safe_ way of configuring endpoints. - -A good practice when configuring options is to use xref:latest@manual::using-propertyplaceholder.adoc[Property Placeholders], -which allows to not hardcode urls, port numbers, sensitive information, and other settings. -In other words placeholders allows to externalize the configuration from your code, and gives more flexibility and reuse. - -The following two sections lists all the options, firstly for the component followed by the endpoint. -// component-configure options: END - -// component options: START -== Component Options - - -The Azure ServiceBus component supports 23 options, which are listed below. - - - -[width="100%",cols="2,5,^1,2",options="header"] -|=== -| Name | Description | Default | Type -| *amqpRetryOptions* (common) | Sets the retry options for Service Bus clients. If not specified, the default retry options are used. | | AmqpRetryOptions -| *amqpTransportType* (common) | Sets the transport type by which all the communication with Azure Service Bus occurs. Default value is AmqpTransportType#AMQP. There are 2 enums and the value can be one of: Amqp, AmqpWebSockets | AMQP | AmqpTransportType -| *clientOptions* (common) | Sets the ClientOptions to be sent from the client built from this builder, enabling customization of certain properties, as well as support the addition of custom header information. Refer to the ClientOptions documentation for more information. | | ClientOptions -| *configuration* (common) | The component configurations | | ServiceBusConfiguration -| *proxyOptions* (common) | Sets the proxy configuration to use for ServiceBusSenderAsyncClient. When a proxy is configured, AmqpTransportType#AMQP_WEB_SOCKETS must be used for the transport type. | | ProxyOptions -| *serviceBusType* (common) | *Required* The service bus type of connection to execute. Queue is for typical queue option and topic for subscription based model. There are 2 enums and the value can be one of: queue, topic | queue | ServiceBusType -| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean -| *consumerOperation* (consumer) | Sets the desired operation to be used in the consumer. There are 2 enums and the value can be one of: receiveMessages, peekMessages | receiveMessages | ServiceBusConsumerOperationDefinition -| *disableAutoComplete* (consumer) | Disables auto-complete and auto-abandon of received messages. By default, a successfully processed message is {link ServiceBusReceiverAsyncClient#complete(ServiceBusReceivedMessage) completed}. If an error happens when the message is processed, it is {link ServiceBusReceiverAsyncClient#abandon(ServiceBusReceivedMessage) abandoned}. | false | boolean -| *maxAutoLockRenewDuration* (consumer) | Sets the amount of time to continue auto-renewing the lock. Setting Duration#ZERO or null disables auto-renewal. For {link ServiceBusReceiveMode#RECEIVE_AND_DELETE RECEIVE_AND_DELETE} mode, auto-renewal is disabled. | 5min | Duration -| *peekNumMaxMessages* (consumer) | Set the max number of messages to be peeked during the peek operation. | | Integer -| *prefetchCount* (consumer) | Sets the prefetch count of the receiver. For both {link ServiceBusReceiveMode#PEEK_LOCK PEEK_LOCK} and {link ServiceBusReceiveMode#RECEIVE_AND_DELETE RECEIVE_AND_DELETE} modes the default value is 1. Prefetch speeds up the message flow by aiming to have a message readily available for local retrieval when and before the application asks for one using ServiceBusReceiverAsyncClient#receiveMessages(). Setting a non-zero value will prefetch that number of messa [...] -| *receiverAsyncClient* (consumer) | *Autowired* Sets the receiverAsyncClient in order to consume messages in the Consumer | | ServiceBusReceiverAsyncClient -| *serviceBusReceiveMode* (consumer) | Sets the receive mode for the receiver. There are 2 enums and the value can be one of: PEEK_LOCK, RECEIVE_AND_DELETE | PEEK_LOCK | ServiceBusReceiveMode -| *subQueue* (consumer) | Sets the type of the SubQueue to connect to. There are 3 enums and the value can be one of: NONE, DEAD_LETTER_QUEUE, TRANSFER_DEAD_LETTER_QUEUE | | SubQueue -| *subscriptionName* (consumer) | Sets the name of the subscription in the topic to listen to. topicOrQueueName and serviceBusType=topic must also be set. | | String -| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *producerOperation* (producer) | Sets the desired operation to be used in the producer. There are 2 enums and the value can be one of: sendMessages, scheduleMessages | sendMessages | ServiceBusProducerOperationDefinition -| *scheduledEnqueueTime* (producer) | Sets OffsetDateTime at which the message should appear in the Service Bus queue or topic. | | OffsetDateTime -| *senderAsyncClient* (producer) | *Autowired* Sets SenderAsyncClient to be used in the producer. | | ServiceBusSenderAsyncClient -| *serviceBusTransactionContext* (producer) | Represents transaction in service. This object just contains transaction id. | | ServiceBusTransactionContext -| *autowiredEnabled* (advanced) | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean -| *connectionString* (security) | *Required* Sets the connection string for a Service Bus namespace or a specific Service Bus resource. | | String -|=== -// component options: END - -// endpoint options: START -== Endpoint Options - -The Azure ServiceBus endpoint is configured using URI syntax: - ----- -azure-servicebus:queueNameOrTopicName ----- - -with the following path and query parameters: - -=== Path Parameters (1 parameters): - - -[width="100%",cols="2,5,^1,2",options="header"] -|=== -| Name | Description | Default | Type -| *topicOrQueueName* | Selected topic name or the queue name, that is depending on serviceBusType config. For example if serviceBusType=queue, then this will be the queue name and if serviceBusType=topic, this will be the topic name. | | String -|=== - - -=== Query Parameters (23 parameters): - - -[width="100%",cols="2,5,^1,2",options="header"] -|=== -| Name | Description | Default | Type -| *amqpRetryOptions* (common) | Sets the retry options for Service Bus clients. If not specified, the default retry options are used. | | AmqpRetryOptions -| *amqpTransportType* (common) | Sets the transport type by which all the communication with Azure Service Bus occurs. Default value is AmqpTransportType#AMQP. There are 2 enums and the value can be one of: Amqp, AmqpWebSockets | AMQP | AmqpTransportType -| *clientOptions* (common) | Sets the ClientOptions to be sent from the client built from this builder, enabling customization of certain properties, as well as support the addition of custom header information. Refer to the ClientOptions documentation for more information. | | ClientOptions -| *proxyOptions* (common) | Sets the proxy configuration to use for ServiceBusSenderAsyncClient. When a proxy is configured, AmqpTransportType#AMQP_WEB_SOCKETS must be used for the transport type. | | ProxyOptions -| *serviceBusType* (common) | *Required* The service bus type of connection to execute. Queue is for typical queue option and topic for subscription based model. There are 2 enums and the value can be one of: queue, topic | queue | ServiceBusType -| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean -| *consumerOperation* (consumer) | Sets the desired operation to be used in the consumer. There are 2 enums and the value can be one of: receiveMessages, peekMessages | receiveMessages | ServiceBusConsumerOperationDefinition -| *disableAutoComplete* (consumer) | Disables auto-complete and auto-abandon of received messages. By default, a successfully processed message is {link ServiceBusReceiverAsyncClient#complete(ServiceBusReceivedMessage) completed}. If an error happens when the message is processed, it is {link ServiceBusReceiverAsyncClient#abandon(ServiceBusReceivedMessage) abandoned}. | false | boolean -| *maxAutoLockRenewDuration* (consumer) | Sets the amount of time to continue auto-renewing the lock. Setting Duration#ZERO or null disables auto-renewal. For {link ServiceBusReceiveMode#RECEIVE_AND_DELETE RECEIVE_AND_DELETE} mode, auto-renewal is disabled. | 5min | Duration -| *peekNumMaxMessages* (consumer) | Set the max number of messages to be peeked during the peek operation. | | Integer -| *prefetchCount* (consumer) | Sets the prefetch count of the receiver. For both {link ServiceBusReceiveMode#PEEK_LOCK PEEK_LOCK} and {link ServiceBusReceiveMode#RECEIVE_AND_DELETE RECEIVE_AND_DELETE} modes the default value is 1. Prefetch speeds up the message flow by aiming to have a message readily available for local retrieval when and before the application asks for one using ServiceBusReceiverAsyncClient#receiveMessages(). Setting a non-zero value will prefetch that number of messa [...] -| *receiverAsyncClient* (consumer) | *Autowired* Sets the receiverAsyncClient in order to consume messages in the Consumer | | ServiceBusReceiverAsyncClient -| *serviceBusReceiveMode* (consumer) | Sets the receive mode for the receiver. There are 2 enums and the value can be one of: PEEK_LOCK, RECEIVE_AND_DELETE | PEEK_LOCK | ServiceBusReceiveMode -| *subQueue* (consumer) | Sets the type of the SubQueue to connect to. There are 3 enums and the value can be one of: NONE, DEAD_LETTER_QUEUE, TRANSFER_DEAD_LETTER_QUEUE | | SubQueue -| *subscriptionName* (consumer) | Sets the name of the subscription in the topic to listen to. topicOrQueueName and serviceBusType=topic must also be set. | | String -| *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler -| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. There are 3 enums and the value can be one of: InOnly, InOut, InOptionalOut | | ExchangePattern -| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *producerOperation* (producer) | Sets the desired operation to be used in the producer. There are 2 enums and the value can be one of: sendMessages, scheduleMessages | sendMessages | ServiceBusProducerOperationDefinition -| *scheduledEnqueueTime* (producer) | Sets OffsetDateTime at which the message should appear in the Service Bus queue or topic. | | OffsetDateTime -| *senderAsyncClient* (producer) | *Autowired* Sets SenderAsyncClient to be used in the producer. | | ServiceBusSenderAsyncClient -| *serviceBusTransactionContext* (producer) | Represents transaction in service. This object just contains transaction id. | | ServiceBusTransactionContext -| *connectionString* (security) | *Required* Sets the connection string for a Service Bus namespace or a specific Service Bus resource. | | String -|=== -// endpoint options: END - - -== Async Consumer and Producer - -This component implements the async Consumer and producer. - -This allows camel route to consume and produce events asynchronously without blocking any threads. - -== Usage - -=== Message headers evaluated by the component producer -[width="100%",cols="10%,10%,10%,70%",options="header",] -|======================================================================= -|Header |Variable Name |Type |Description - -|`CamelAzureServiceBusScheduledEnqueueTime`| `ServiceBusConstants.SCHEDULED_ENQUEUE_TIME`|`OffsetDateTime`| Overrides the OffsetDateTime at which the message should appear in the Service Bus queue or topic. -|`CamelAzureServiceBusServiceBusTransactionContext`| `ServiceBusConstants.SERVICE_BUS_TRANSACTION_CONTEXT`|`ServiceBusTransactionContext`| Overrides the transaction in service. This object just contains transaction id. -|`CamelAzureServiceBusProducerOperation`| `ServiceBusConstants.PRODUCER_OPERATION`|`ServiceBusProducerOperationDefinition`| Overrides the desired operation to be used in the producer. -|======================================================================= - - -=== Message headers set by the component consumer -[width="100%",cols="10%,10%,10%,70%",options="header",] -|======================================================================= -|Header |Variable Name |Type |Description - -|`CamelAzureServiceBusApplicationProperties`| `ServiceBusConstants.APPLICATION_PROPERTIES`|`Map<String, Object>`| Gets the set of free-form {@link ServiceBusReceivedMessage} properties which may be used for passing metadata associated with the {@link ServiceBusReceivedMessage} during Service Bus operations. -|`CamelAzureServiceBusContentType`| `ServiceBusConstants.CONTENT_TYPE`|`String`| Gets the content type of the message. -|`CamelAzureServiceBusMessageId`| `ServiceBusConstants.MESSAGE_ID`|`String`| Gets the identifier for the message. -|`CamelAzureServiceBusCorrelationId`| `ServiceBusConstants.CORRELATION_ID`|`String`| Gets a correlation identifier. -|`CamelAzureServiceBusDeadLetterErrorDescription`| `ServiceBusConstants.DEAD_LETTER_ERROR_DESCRIPTION`|`String`| Gets the description for a message that has been dead-lettered. -|`CamelAzureServiceBusDeadLetterReason`| `ServiceBusConstants.DEAD_LETTER_REASON`|`String`| Gets the reason a message was dead-lettered. -|`CamelAzureServiceBusDeadLetterSource`| `ServiceBusConstants.DEAD_LETTER_SOURCE`|`String`| Gets the name of the queue or subscription that this message was enqueued on, before it was dead-lettered. -|`CamelAzureServiceBusDeliveryCount`| `ServiceBusConstants.DELIVERY_COUNT`|`long`| Gets the number of the times this message was delivered to clients. -|`CamelAzureServiceBusScheduledEnqueueTime`| `ServiceBusConstants.SCHEDULED_ENQUEUE_TIME`|`OffsetDateTime`| Gets the scheduled enqueue time of this message. -|`CamelAzureServiceBusEnqueuedSequenceNumber`| `ServiceBusConstants.ENQUEUED_SEQUENCE_NUMBER`|`long`| Gets the enqueued sequence number assigned to a message by Service Bus. -|`CamelAzureServiceBusEnqueuedTime`| `ServiceBusConstants.ENQUEUED_TIME`|`OffsetDateTime`| Gets the datetime at which this message was enqueued in Azure Service Bus. -|`CamelAzureServiceBusExpiresAt`| `ServiceBusConstants.EXPIRES_AT`|`OffsetDateTime`| Gets the datetime at which this message will expire. -|`CamelAzureServiceBusLockToken`| `ServiceBusConstants.LOCK_TOKEN`|`String`| Gets the lock token for the current message. -|`CamelAzureServiceBusLockedUntil`| `ServiceBusConstants.LOCKED_UNTIL`|`OffsetDateTime`| Gets the datetime at which the lock of this message expires. -|`CamelAzureServiceBusPartitionKey`| `ServiceBusConstants.PARTITION_KEY`|`String`| Gets the partition key for sending a message to a partitioned entity. -|`CamelAzureServiceBusRawAmqpMessage`| `ServiceBusConstants.RAW_AMQP_MESSAGE`|`AmqpAnnotatedMessage`| The representation of message as defined by AMQP protocol. -|`CamelAzureServiceBusReplyTo`| `ServiceBusConstants.REPLY_TO`|`String`| Gets the address of an entity to send replies to. -|`CamelAzureServiceBusReplyToSessionId`| `ServiceBusConstants.REPLY_TO_SESSION_ID`|`String`| Gets or sets a session identifier augmenting the {@link #getReplyTo() ReplyTo} address. -|`CamelAzureServiceBusSequenceNumber`| `ServiceBusConstants.SEQUENCE_NUMBER`|`long`| Gets the unique number assigned to a message by Service Bus. -|`CamelAzureServiceBusSessionId`| `ServiceBusConstants.SESSION_ID`|`String`| Gets the session id of the message. -|`CamelAzureServiceBusSubject`| `ServiceBusConstants.SUBJECT`|`String`| Gets the subject for the message. -|`CamelAzureServiceBusTimeToLive`| `ServiceBusConstants.TIME_TO_LIVE`|`Duration`| Gets the duration before this message expires. -|`CamelAzureServiceBusTimeTo`| `ServiceBusConstants.TO`|`String`| Gets the "to" address. -|======================================================================= - - -=== Message Body -In the producer, this component accepts message body of `String` type or `List<String>` to send batch messages. - -In the consumer, the returned message body will be of type `String. - - -=== Azure ServiceBus Producer operations -[width="100%",cols="10%,90%",options="header",] -|=== -|Operation |Description -|`sendMessages` | Sends a set of messages to a Service Bus queue or topic using a batched approach. -|`scheduleMessages` | Sends a scheduled message to the Azure Service Bus entity this sender is connected to. A scheduled message is enqueued and made available to receivers only at the scheduled enqueue time. -|=== - - -=== Azure ServiceBus Consumer operations -[width="100%",cols="10%,90%",options="header",] -|=== -|Operation |Description -|`receiveMessages` | Receives an <b>infinite</b> stream of messages from the Service Bus entity. -|`peekMessages` | Reads the next batch of active messages without changing the state of the receiver or the message source. -|=== - - -==== Examples -- `sendMessages` - -[source,java] --------------------------------------------------------------------------------- -from("direct:start") - .process(exchange -> { - final List<Object> inputBatch = new LinkedList<>(); - inputBatch.add("test batch 1"); - inputBatch.add("test batch 2"); - inputBatch.add("test batch 3"); - inputBatch.add(123456); - - exchange.getIn().setBody(inputBatch); - }) - .to("azure-servicebus:test//?connectionString=test") - .to("mock:result"); --------------------------------------------------------------------------------- - - -- `scheduleMessages` - -[source,java] --------------------------------------------------------------------------------- -from("direct:start") - .process(exchange -> { - final List<Object> inputBatch = new LinkedList<>(); - inputBatch.add("test batch 1"); - inputBatch.add("test batch 2"); - inputBatch.add("test batch 3"); - inputBatch.add(123456); - - exchange.getIn().setHeader(ServiceBusConstants.SCHEDULED_ENQUEUE_TIME, OffsetDateTime.now()); - exchange.getIn().setBody(inputBatch); - }) - .to("azure-servicebus:test//?connectionString=test&producerOperation=scheduleMessages") - .to("mock:result"); --------------------------------------------------------------------------------- - -- `receiveMessages` - -[source,java] --------------------------------------------------------------------------------- -from("azure-servicebus:test//?connectionString=test") - .log("${body}") - .to("mock:result"); --------------------------------------------------------------------------------- - -- `peekMessages` - -[source,java] --------------------------------------------------------------------------------- -from("azure-servicebus:test//?connectionString=test&consumerOperation=peekMessages&peekNumMaxMessages=3") - .log("${body}") - .to("mock:result"); --------------------------------------------------------------------------------- - - -include::{page-component-version}@camel-spring-boot::page$azure-servicebus-starter.adoc[] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/disruptor-vm-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/disruptor-vm-component.adoc index 76349a4..b88f36a 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/disruptor-vm-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/disruptor-vm-component.adoc @@ -84,8 +84,10 @@ endpoint within the current CamelContext. // component-configure options: START // component-configure options: END + // component options: START // component options: END + // endpoint options: START // endpoint options: END diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hwcloud-obs-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hwcloud-obs-component.adoc deleted file mode 100644 index 7917b12..0000000 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hwcloud-obs-component.adoc +++ /dev/null @@ -1,281 +0,0 @@ -[[hwcloud-obs-component]] -= Huawei Object Storage Service (OBS) Component -:docTitle: Huawei Object Storage Service (OBS) -:artifactId: camel-huaweicloud-obs -:description: To provide stable, secure, efficient, and easy-to-use cloud storage service on Huawei Cloud -:since: 3.12 -:supportLevel: Preview -:component-header: Both producer and consumer are supported -include::{cq-version}@camel-quarkus:ROOT:partial$reference/components/hwcloud-obs.adoc[opts=optional] -//Manually maintained attributes -:group: Huawei Cloud - -*Since Camel {since}* - -*{component-header}* - -Huawei Cloud Object Storage Service (OBS) component allows you to integrate with https://www.huaweicloud.com/intl/en-us/product/obs.html[OBS] provided by Huawei Cloud. - -Maven users will need to add the following dependency to their `pom.xml` for this component: - -[source,xml] ----- -<dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-huaweicloud-obs</artifactId> - <version>x.x.x</version> - <!-- use the same version as your Camel core version --> -</dependency> ----- - -== URI Format - ----- -hwcloud-obs:operation[?options] ----- - - -// component-configure options: START -== Configuring Options - -Camel components are configured on two separate levels: - -- component level -- endpoint level - -=== Configuring Component Options - -The component level is the highest level which holds general and common configurations that are inherited by the endpoints. -For example a component may have security settings, credentials for authentication, urls for network connection and so forth. - -Some components only have a few options, and others may have many. Because components typically have pre configured defaults -that are commonly used, then you may often only need to configure a few options on a component; or none at all. - -Configuring components can be done with the xref:latest@manual::component-dsl.adoc[Component DSL], -in a configuration file (application.properties|yaml), or directly with Java code. - -=== Configuring Endpoint Options - -Where you find yourself configuring the most is on endpoints, as endpoints often have many options, which allows you to -configure what you need the endpoint to do. The options are also categorized into whether the endpoint is used as consumer (from) -or as a producer (to), or used for both. - -Configuring endpoints is most often done directly in the endpoint URI as path and query parameters. You can also use -the xref:latest@manual::Endpoint-dsl.adoc[Endpoint DSL] as a _type safe_ way of configuring endpoints. - -A good practice when configuring options is to use xref:latest@manual::using-propertyplaceholder.adoc[Property Placeholders], -which allows to not hardcode urls, port numbers, sensitive information, and other settings. -In other words placeholders allows to externalize the configuration from your code, and gives more flexibility and reuse. - -The following two sections lists all the options, firstly for the component followed by the endpoint. -// component-configure options: END - -// component options: START -== Component Options - - -The Huawei Object Storage Service (OBS) component supports 3 options, which are listed below. - - - -[width="100%",cols="2,5,^1,2",options="header"] -|=== -| Name | Description | Default | Type -| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean -| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *autowiredEnabled* (advanced) | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean -|=== -// component options: END - -// endpoint options: START -== Endpoint Options - -The Huawei Object Storage Service (OBS) endpoint is configured using URI syntax: - ----- -hwcloud-obs:operation ----- - -with the following path and query parameters: - -=== Path Parameters (1 parameters): - - -[width="100%",cols="2,5,^1,2",options="header"] -|=== -| Name | Description | Default | Type -| *operation* | *Required* Operation to be performed | | String -|=== - - -=== Query Parameters (40 parameters): - - -[width="100%",cols="2,5,^1,2",options="header"] -|=== -| Name | Description | Default | Type -| *bucketName* (common) | Name of bucket to perform operation on | | String -| *endpoint* (common) | OBS url. Carries higher precedence than region parameter based client initialization | | String -| *region* (common) | *Required* OBS service region. This is lower precedence than endpoint based configuration | | String -| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean -| *deleteAfterRead* (consumer) | Determines if objects should be deleted after it has been retrieved | false | boolean -| *delimiter* (consumer) | The character used for grouping object names | | String -| *destinationBucket* (consumer) | Name of destination bucket where objects will be moved when moveAfterRead is set to true | | String -| *fileName* (consumer) | Get the object from the bucket with the given file name | | String -| *includeFolders* (consumer) | If true, objects in folders will be consumed. Otherwise, they will be ignored and no Exchanges will be created for them | true | boolean -| *maxMessagesPerPoll* (consumer) | The maximum number of messages to poll at each polling | 10 | int -| *moveAfterRead* (consumer) | Determines whether objects should be moved to a different bucket after they have been retrieved. The destinationBucket option must also be set for this option to work. | false | boolean -| *prefix* (consumer) | The object name prefix used for filtering objects to be listed | | String -| *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. | false | boolean -| *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler -| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. There are 3 enums and the value can be one of: InOnly, InOut, InOptionalOut | | ExchangePattern -| *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. | | PollingConsumerPollStrategy -| *bucketLocation* (producer) | Location of bucket when creating a new bucket | | String -| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *proxyHost* (proxy) | Proxy server ip/hostname | | String -| *proxyPassword* (proxy) | Proxy authentication password | | String -| *proxyPort* (proxy) | Proxy server port | | int -| *proxyUser* (proxy) | Proxy authentication user | | String -| *backoffErrorThreshold* (scheduler) | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. | | int -| *backoffIdleThreshold* (scheduler) | The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. | | int -| *backoffMultiplier* (scheduler) | To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. | | int -| *delay* (scheduler) | Milliseconds before the next poll. | 500 | long -| *greedy* (scheduler) | If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages. | false | boolean -| *initialDelay* (scheduler) | Milliseconds before the first poll starts. | 1000 | long -| *repeatCount* (scheduler) | Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever. | 0 | long -| *runLoggingLevel* (scheduler) | The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. There are 6 enums and the value can be one of: TRACE, DEBUG, INFO, WARN, ERROR, OFF | TRACE | LoggingLevel -| *scheduledExecutorService* (scheduler) | Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. | | ScheduledExecutorService -| *scheduler* (scheduler) | To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler | none | Object -| *schedulerProperties* (scheduler) | To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler. | | Map -| *startScheduler* (scheduler) | Whether the scheduler should be auto started. | true | boolean -| *timeUnit* (scheduler) | Time unit for initialDelay and delay options. There are 7 enums and the value can be one of: NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS | MILLISECONDS | TimeUnit -| *useFixedDelay* (scheduler) | Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. | true | boolean -| *authenticationKey* (security) | *Required* Authentication key for the cloud user | | String -| *ignoreSslVerification* (security) | Ignore SSL verification | false | boolean -| *secretKey* (security) | *Required* Secret key for the cloud user | | String -| *serviceKeys* (security) | Configuration object for cloud service authentication | | ServiceKeys -|=== -// endpoint options: END - - -== Usage - -=== Message properties evaluated by the OBS producer - -[width="100%",cols="10%,10%,80%",options="header",] -|======================================================================= -|Header |Type |Description - -|`CamelHwCloudObsOperation` |`String` | Name of operation to invoke - -|`CamelHwCloudObsBucketName` |`String` | Bucket name to invoke operation on - -|`CamelHwCloudObsBucketLocation` |`String` | Bucket location when creating a new bucket - -|======================================================================= - -If any of the above properties are set, they will override their corresponding query parameter. - -=== Message properties set by the OBS producer - -[width="100%",cols="10%,10%,80%",options="header",] -|======================================================================= -|Header |Type |Description - -|`CamelHwCloudObsBucketExists` |`boolean` | Return value when invoking the `checkBucketExists` operation - -|======================================================================= - -=== Message headers set by the OBS consumer - -[width="100%",cols="10%,10%,80%",options="header",] -|======================================================================= -|Header |Type |Description - -|`CamelHwCloudObsBucketName` |`String` | Name of the bucket where object is contained - -|`CamelHwCloudObsObjectKey` |`String` | The key that the object is stored under - -|`CamelHwCloudObsLastModified` |`String` | The date and time that the object was last modified - -|`Content-Length` |`String` | The size of the object body in bytes - -|`Content-Type` |`String` | The type of content stored in the object - -|`CamelHwCloudObsETag` |`String` | The 128-bit MD5 digest of the Base64 code of the object. This data is the unique identifier of the object content - -|`CamelHwCloudObsContentMD5` |`String` | The 128-bit Base64-encoded digest used to decrypt the object - -|`CamelHwCloudObsObjectType` |`String` | Shows whether the object is a `file` or a `folder` - -|======================================================================= - - -== List of Supported OBS Operations - -- listBuckets -- createBucket - `bucketName` parameter is *required*, `bucketLocation` parameter is optional -- deleteBucket - `bucketName` parameter is *required* -- checkBucketExists - `bucketName` parameter is *required* -- getBucketMetadata - `bucketName` parameter is *required* -- listObjects - `bucketName` parameter is *required* - -=== Passing Options Through Exchange Body -There are many options that can be submited to the `createBucket` and `listObjects` operations, so they can be passed through the exchange body. - -If you would like to configure all the https://support.huaweicloud.com/intl/en-us/api-obs/obs_04_0021.html[parameters] when creating a bucket, you can pass a https://obssdk-intl.obs.ap-southeast-1.myhuaweicloud.com/apidoc/en/java/com/obs/services/model/CreateBucketRequest.html[CreateBucketRequest] object or a Json string into the exchange body. If the exchange body is empty, a new bucket will be created using the bucketName and bucketLocation (if provided) passed through the endpoint uri. - -[source,java] ----- -from("direct:triggerRoute") - .setBody(new CreateBucketRequest("Bucket name", "Bucket location")) - .to("hwcloud-obs:createBucket?region=cn-north-4&authenticationKey=********&secretKey=********") ----- - -[source,java] ----- -from("direct:triggerRoute") - .setBody("{\"bucketName\":\"Bucket name\",\"location\":\"Bucket location\"}") - .to("hwcloud-obs:createBucket?region=cn-north-4&authenticationKey=********&secretKey=********") ----- - -If you would like to configure all the https://support.huaweicloud.com/intl/en-us/api-obs/obs_04_0022.html[parameters] when listing objects, you can pass a https://obssdk-intl.obs.ap-southeast-1.myhuaweicloud.com/apidoc/en/java/com/obs/services/model/ListObjectsRequest.html[ListObjectsRequest] object or a Json string into the exchange body. If the exchange body is empty, objects will be listed based on the bucketName passed through the endpoint uri. - -[source,java] ----- -from("direct:triggerRoute") - .setBody(new ListObjectsRequest("Bucket name", 1000)) - .to("hwcloud-obs:listObjects?region=cn-north-4&authenticationKey=********&secretKey=********") ----- - -[source,java] ----- -from("direct:triggerRoute") - .setBody("{\"bucketName\":\"Bucket name\",\"maxKeys\":1000"}") - .to("hwcloud-obs:listObjects?region=cn-north-4&authenticationKey=********&secretKey=********") ----- - - -== Using ServiceKey Configuration Bean - -Authentication key and secret keys are required to authenticate against the OBS cloud. You can avoid having them being exposed -and scattered over in your endpoint uri by wrapping them inside a bean of class `org.apache.camel.component.huaweicloud.obs.models.ServiceKeys`. -Add it to the registry and let Camel look it up by referring the object via endpoint query parameter `serviceKeys`. - -Check the following code snippets: - -[source,xml] ----- -<bean id="myServiceKeyConfig" class="org.apache.camel.component.huaweicloud.obs.models.ServiceKeys"> - <property name="authenticationKey" value="your_authentication_key" /> - <property name="secretKey" value="your_secret_key" /> -</bean> ----- -[source,java] ----- -from("direct:triggerRoute") - .setProperty(OBSPropeties.OPERATION, constant("createBucket")) - .setProperty(OBSPropeties.BUCKET_NAME ,constant("your_bucket_name")) - .setProperty(OBSPropeties.BUCKET_LOCATION, constant("your_bucket_location)) - .to("hwcloud-obs:createBucket?region=cn-north-4&serviceKeys=#myServiceKeyConfig") ----- diff --git a/docs/components/modules/ROOT/pages/disruptor-vm-component.adoc b/docs/components/modules/ROOT/pages/disruptor-vm-component.adoc index 5abaa5d..e6f19a7 100644 --- a/docs/components/modules/ROOT/pages/disruptor-vm-component.adoc +++ b/docs/components/modules/ROOT/pages/disruptor-vm-component.adoc @@ -86,8 +86,10 @@ endpoint within the current CamelContext. // component-configure options: START // component-configure options: END + // component options: START // component options: END + // endpoint options: START // endpoint options: END