You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/07/01 12:15:46 UTC

[camel] branch master updated (8a1fa2d -> 3e23bbe)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 8a1fa2d  Explicitly default the Kafka sslEndpointAlgorithm to "https", to mirror what Kafka sets as default. This makes our documentation a bit clearer.
     new 4eced49  CAMEL-15264 - Camel-AWS2-Kinesis: Add more operations support
     new 9952f4c  CAMEL-15264 - Added docs for updateDestination
     new 3e23bbe  Regen website docs

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../component/aws2/firehose/aws2-kinesis-firehose.json   |  4 ++--
 .../src/main/docs/aws2-kinesis-firehose-component.adoc   |  5 +++--
 .../aws2/firehose/KinesisFirehose2Operations.java        |  2 +-
 .../aws2/firehose/KinesisFirehose2Producer.java          | 16 ++++++++++++++++
 .../dsl/KinesisFirehose2EndpointBuilderFactory.java      |  3 ++-
 .../ROOT/pages/aws2-kinesis-firehose-component.adoc      |  5 +++--
 6 files changed, 27 insertions(+), 8 deletions(-)


[camel] 03/03: Regen website docs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 3e23bbe543caeef1501c01fa278b6b09dcaa6269
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jul 1 14:13:32 2020 +0200

    Regen website docs
---
 .../modules/ROOT/pages/aws2-kinesis-firehose-component.adoc          | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/components/modules/ROOT/pages/aws2-kinesis-firehose-component.adoc b/docs/components/modules/ROOT/pages/aws2-kinesis-firehose-component.adoc
index 0d61818..9c3587f 100644
--- a/docs/components/modules/ROOT/pages/aws2-kinesis-firehose-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-kinesis-firehose-component.adoc
@@ -53,7 +53,7 @@ The AWS 2 Kinesis Firehose component supports 11 options, which are listed below
 | *amazonKinesisFirehoseClient* (producer) | Amazon Kinesis Firehose client to use for all requests for this endpoint |  | FirehoseClient
 | *configuration* (producer) | Component configuration |  | KinesisFirehose2Configuration
 | *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 [...]
-| *operation* (producer) | The operation to do in case the user don't want to send only a record. The value can be one of: sendBatchRecord, createDeliveryStream, deleteDeliveryStream |  | KinesisFirehose2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a record. The value can be one of: sendBatchRecord, createDeliveryStream, deleteDeliveryStream, updateDestination |  | KinesisFirehose2Operations
 | *proxyHost* (producer) | To define a proxy host when instantiating the Kinesis Firehose client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Kinesis Firehose client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the Kinesis Firehose client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
@@ -97,7 +97,7 @@ with the following path and query parameters:
 | Name | Description | Default | Type
 | *amazonKinesisFirehoseClient* (producer) | Amazon Kinesis Firehose client to use for all requests for this endpoint |  | FirehoseClient
 | *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 [...]
-| *operation* (producer) | The operation to do in case the user don't want to send only a record. The value can be one of: sendBatchRecord, createDeliveryStream, deleteDeliveryStream |  | KinesisFirehose2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a record. The value can be one of: sendBatchRecord, createDeliveryStream, deleteDeliveryStream, updateDestination |  | KinesisFirehose2Operations
 | *proxyHost* (producer) | To define a proxy host when instantiating the Kinesis Firehose client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Kinesis Firehose client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the Kinesis Firehose client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
@@ -151,6 +151,7 @@ Camel-AWS s3 component provides the following operation on the producer side:
 - SendBatchRecord
 - CreateDeliveryStream
 - DeleteDeliveryStream
+- UpdateDestination
 
 === Send Batch Records Example
 


[camel] 02/03: CAMEL-15264 - Added docs for updateDestination

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 9952f4cd65ccb56f9a42968ae7151e0d427a9592
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jul 1 14:12:59 2020 +0200

    CAMEL-15264 - Added docs for updateDestination
---
 .../apache/camel/component/aws2/firehose/aws2-kinesis-firehose.json  | 4 ++--
 .../src/main/docs/aws2-kinesis-firehose-component.adoc               | 5 +++--
 .../builder/endpoint/dsl/KinesisFirehose2EndpointBuilderFactory.java | 3 ++-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/firehose/aws2-kinesis-firehose.json b/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/firehose/aws2-kinesis-firehose.json
index 11227c5..3867bca 100644
--- a/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/firehose/aws2-kinesis-firehose.json
+++ b/components/camel-aws2-kinesis/src/generated/resources/org/apache/camel/component/aws2/firehose/aws2-kinesis-firehose.json
@@ -24,7 +24,7 @@
     "amazonKinesisFirehoseClient": { "kind": "property", "displayName": "Amazon Kinesis Firehose Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.firehose.FirehoseClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "Amazon Kinesis Firehose client to use for all requests  [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "deprecated": false, "secret": false, "description": "Component configuration" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "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 r [...]
-    "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Operations", "enum": [ "sendBatchRecord", "createDeliveryStream", "deleteDeliveryStream" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "descriptio [...]
+    "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Operations", "enum": [ "sendBatchRecord", "createDeliveryStream", "deleteDeliveryStream", "updateDestination" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "config [...]
     "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Kinesis Firehose client" },
     "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Kinesis Firehose client" },
     "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the  [...]
@@ -37,7 +37,7 @@
     "streamName": { "kind": "path", "displayName": "Stream Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "Name of the stream" },
     "amazonKinesisFirehoseClient": { "kind": "parameter", "displayName": "Amazon Kinesis Firehose Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.firehose.FirehoseClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "Amazon Kinesis Firehose client to use for all requests [...]
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "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  [...]
-    "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Operations", "enum": [ "sendBatchRecord", "createDeliveryStream", "deleteDeliveryStream" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "descripti [...]
+    "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Operations", "enum": [ "sendBatchRecord", "createDeliveryStream", "deleteDeliveryStream", "updateDestination" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "confi [...]
     "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Kinesis Firehose client" },
     "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Kinesis Firehose client" },
     "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.firehose.KinesisFirehose2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the [...]
diff --git a/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc
index 34902ce..e8a8167 100644
--- a/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc
+++ b/components/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc
@@ -51,7 +51,7 @@ The AWS 2 Kinesis Firehose component supports 11 options, which are listed below
 | *amazonKinesisFirehoseClient* (producer) | Amazon Kinesis Firehose client to use for all requests for this endpoint |  | FirehoseClient
 | *configuration* (producer) | Component configuration |  | KinesisFirehose2Configuration
 | *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 [...]
-| *operation* (producer) | The operation to do in case the user don't want to send only a record. The value can be one of: sendBatchRecord, createDeliveryStream, deleteDeliveryStream |  | KinesisFirehose2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a record. The value can be one of: sendBatchRecord, createDeliveryStream, deleteDeliveryStream, updateDestination |  | KinesisFirehose2Operations
 | *proxyHost* (producer) | To define a proxy host when instantiating the Kinesis Firehose client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Kinesis Firehose client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the Kinesis Firehose client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
@@ -95,7 +95,7 @@ with the following path and query parameters:
 | Name | Description | Default | Type
 | *amazonKinesisFirehoseClient* (producer) | Amazon Kinesis Firehose client to use for all requests for this endpoint |  | FirehoseClient
 | *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 [...]
-| *operation* (producer) | The operation to do in case the user don't want to send only a record. The value can be one of: sendBatchRecord, createDeliveryStream, deleteDeliveryStream |  | KinesisFirehose2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a record. The value can be one of: sendBatchRecord, createDeliveryStream, deleteDeliveryStream, updateDestination |  | KinesisFirehose2Operations
 | *proxyHost* (producer) | To define a proxy host when instantiating the Kinesis Firehose client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Kinesis Firehose client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the Kinesis Firehose client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
@@ -149,6 +149,7 @@ Camel-AWS s3 component provides the following operation on the producer side:
 - SendBatchRecord
 - CreateDeliveryStream
 - DeleteDeliveryStream
+- UpdateDestination
 
 === Send Batch Records Example
 
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KinesisFirehose2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KinesisFirehose2EndpointBuilderFactory.java
index d65f274..87eb4ff 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KinesisFirehose2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KinesisFirehose2EndpointBuilderFactory.java
@@ -317,7 +317,8 @@ public interface KinesisFirehose2EndpointBuilderFactory {
     enum KinesisFirehose2Operations {
         sendBatchRecord,
         createDeliveryStream,
-        deleteDeliveryStream;
+        deleteDeliveryStream,
+        updateDestination;
     }
 
     /**


[camel] 01/03: CAMEL-15264 - Camel-AWS2-Kinesis: Add more operations support

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4eced49893236f3095444a2144bfd94ffe26d204
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jul 1 14:10:35 2020 +0200

    CAMEL-15264 - Camel-AWS2-Kinesis: Add more operations support
---
 .../aws2/firehose/KinesisFirehose2Operations.java        |  2 +-
 .../aws2/firehose/KinesisFirehose2Producer.java          | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/components/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2Operations.java b/components/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2Operations.java
index 93ec644..fcc9bbf 100644
--- a/components/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2Operations.java
+++ b/components/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2Operations.java
@@ -18,5 +18,5 @@ package org.apache.camel.component.aws2.firehose;
 
 public enum KinesisFirehose2Operations {
 
-    sendBatchRecord, createDeliveryStream, deleteDeliveryStream
+    sendBatchRecord, createDeliveryStream, deleteDeliveryStream, updateDestination
 }
diff --git a/components/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2Producer.java b/components/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2Producer.java
index 95aff68..a6ae72d 100644
--- a/components/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2Producer.java
+++ b/components/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/firehose/KinesisFirehose2Producer.java
@@ -36,6 +36,8 @@ import software.amazon.awssdk.services.firehose.model.PutRecordBatchResponse;
 import software.amazon.awssdk.services.firehose.model.PutRecordRequest;
 import software.amazon.awssdk.services.firehose.model.PutRecordResponse;
 import software.amazon.awssdk.services.firehose.model.Record;
+import software.amazon.awssdk.services.firehose.model.UpdateDestinationRequest;
+import software.amazon.awssdk.services.firehose.model.UpdateDestinationResponse;
 
 public class KinesisFirehose2Producer extends DefaultProducer {
 
@@ -66,6 +68,9 @@ public class KinesisFirehose2Producer extends DefaultProducer {
                 case deleteDeliveryStream:
                     deleteDeliveryStream(getClient(), exchange);
                     break;
+                case updateDestination:
+                    updateDestination(getClient(), exchange);
+                    break;
                 default:
                     throw new IllegalArgumentException("Unsupported operation");
             }
@@ -100,6 +105,17 @@ public class KinesisFirehose2Producer extends DefaultProducer {
             }
         }    
     }
+    
+    private void updateDestination(FirehoseClient client, Exchange exchange) {
+        if (exchange.getIn().getBody() instanceof CreateDeliveryStreamRequest) {
+            UpdateDestinationRequest req = exchange.getIn().getBody(UpdateDestinationRequest.class);
+            UpdateDestinationResponse result = client.updateDestination(req);
+            Message message = getMessageForResponse(exchange);
+            message.setBody(result);
+        } else {
+            throw new IllegalArgumentException("The updateDestination operation expects an UpdateDestinationRequest instance as body");
+        }    
+    }
 
     private void sendBatchRecord(FirehoseClient client, Exchange exchange) {
         if (exchange.getIn().getBody() instanceof Iterable) {