From 6d1fafabb80cb4b68c67b422edd50a6d5b1db411 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 13 Sep 2021 15:36:00 +0200 Subject: [PATCH 1/5] AWS S3 Streaming Upload Kamelet: Support also StreamingUploadTimeout parameter --- aws-s3-streaming-upload-sink.kamelet.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aws-s3-streaming-upload-sink.kamelet.yaml b/aws-s3-streaming-upload-sink.kamelet.yaml index e806b7496..2d25ef8b5 100644 --- a/aws-s3-streaming-upload-sink.kamelet.yaml +++ b/aws-s3-streaming-upload-sink.kamelet.yaml @@ -75,6 +75,10 @@ spec: description: The batch size (in bytes) in streaming upload mode type: int default: '1000000' + streamingUploadTimeout: + title: Streaming Upload Timeout + description: While streaming upload mode is true, this option set the timeout to complete upload + type: long namingStrategy: title: Naming Strategy description: The naming strategy to use in streaming upload mode. There are 2 enums and the value can be one of progressive, random @@ -104,4 +108,5 @@ spec: batchSize: "{{batchSize}}" namingStrategy: "{{namingStrategy}}" keyName: "{{keyName}}" + streamingUploadMode: "{{?streamingUploadTimeout}}" From 1a0eccc6e10cf1cf7d423f1120de5f15020f2caf Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 13 Sep 2021 15:36:43 +0200 Subject: [PATCH 2/5] AWS S3 Streaming Upload Kamelet: Support also StreamingUploadTimeout parameter --- .../kamelets/aws-s3-streaming-upload-sink.kamelet.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml index e806b7496..2d25ef8b5 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml @@ -75,6 +75,10 @@ spec: description: The batch size (in bytes) in streaming upload mode type: int default: '1000000' + streamingUploadTimeout: + title: Streaming Upload Timeout + description: While streaming upload mode is true, this option set the timeout to complete upload + type: long namingStrategy: title: Naming Strategy description: The naming strategy to use in streaming upload mode. There are 2 enums and the value can be one of progressive, random @@ -104,4 +108,5 @@ spec: batchSize: "{{batchSize}}" namingStrategy: "{{namingStrategy}}" keyName: "{{keyName}}" + streamingUploadMode: "{{?streamingUploadTimeout}}" From 21bd4093303cc735735ad2087f641185165cb8a2 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 13 Sep 2021 15:36:59 +0200 Subject: [PATCH 3/5] Regen all --- .../pages/aws-s3-streaming-upload-sink.adoc | 1 + .../ROOT/pages/has-header-filter-action.adoc | 1 + .../ROOT/pages/kafka-not-secured-source.adoc | 1 + docs/modules/ROOT/pages/kafka-source.adoc | 1 + docs/modules/ROOT/pages/rabbitmq-source.adoc | 21 ++++++++----------- docs/modules/ROOT/pages/telegram-source.adoc | 4 ++++ .../camel-k/rabbitmq-source-binding.yaml | 4 +--- .../core/rabbitmq-source-binding.yaml | 4 +--- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/docs/modules/ROOT/pages/aws-s3-streaming-upload-sink.adoc b/docs/modules/ROOT/pages/aws-s3-streaming-upload-sink.adoc index 319a9cfe4..f316a77c8 100644 --- a/docs/modules/ROOT/pages/aws-s3-streaming-upload-sink.adoc +++ b/docs/modules/ROOT/pages/aws-s3-streaming-upload-sink.adoc @@ -24,6 +24,7 @@ The following table summarizes the configuration options available for the `aws- | namingStrategy| Naming Strategy| The naming strategy to use in streaming upload mode. There are 2 enums and the value can be one of progressive, random| string| `"progressive"`| | restartingPolicy| Restarting Policy| The restarting policy to use in streaming upload mode. There are 2 enums and the value can be one of override, lastPart| string| `"lastPart"`| | streamingUploadMode| Streaming Upload Mode| Setting the Streaming Upload Mode| boolean| `true`| +| streamingUploadTimeout| Streaming Upload Timeout| While streaming upload mode is true, this option set the timeout to complete upload| long| | |=== NOTE: Fields marked with ({empty}*) are mandatory. diff --git a/docs/modules/ROOT/pages/has-header-filter-action.adoc b/docs/modules/ROOT/pages/has-header-filter-action.adoc index 7cf1775fa..f1d23494c 100644 --- a/docs/modules/ROOT/pages/has-header-filter-action.adoc +++ b/docs/modules/ROOT/pages/has-header-filter-action.adoc @@ -14,6 +14,7 @@ The following table summarizes the configuration options available for the `has- |=== | Property| Name| Description| Type| Default| Example | *name {empty}* *| Header Name| The header name to evaluate| string| | `"headerName"` +| value| Header Value| An optional header value to compare the header to| string| | `"headerValue"` |=== NOTE: Fields marked with ({empty}*) are mandatory. diff --git a/docs/modules/ROOT/pages/kafka-not-secured-source.adoc b/docs/modules/ROOT/pages/kafka-not-secured-source.adoc index c782de8f4..c03ed6666 100644 --- a/docs/modules/ROOT/pages/kafka-not-secured-source.adoc +++ b/docs/modules/ROOT/pages/kafka-not-secured-source.adoc @@ -18,6 +18,7 @@ The following table summarizes the configuration options available for the `kafk | allowManualCommit| Allow Manual Commit| Whether to allow doing manual commits| boolean| `false`| | autoCommitEnable| Auto Commit Enable| If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer| boolean| `true`| | autoOffsetReset| Auto Offset Reset| What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none| string| `"latest"`| +| consumerGroup| Consumer Group| A string that uniquely identifies the group of consumers to which this source belongs| string| | `"my-group-id"` | pollOnError| Poll On Error Behavior| What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of DISCARD, ERROR_HANDLER, RECONNECT, RETRY, STOP| string| `"ERROR_HANDLER"`| |=== diff --git a/docs/modules/ROOT/pages/kafka-source.adoc b/docs/modules/ROOT/pages/kafka-source.adoc index d58652ac9..e1b856725 100644 --- a/docs/modules/ROOT/pages/kafka-source.adoc +++ b/docs/modules/ROOT/pages/kafka-source.adoc @@ -20,6 +20,7 @@ The following table summarizes the configuration options available for the `kafk | allowManualCommit| Allow Manual Commit| Whether to allow doing manual commits| boolean| `false`| | autoCommitEnable| Auto Commit Enable| If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer| boolean| `true`| | autoOffsetReset| Auto Offset Reset| What to do when there is no initial offset. There are 3 enums and the value can be one of latest, earliest, none| string| `"latest"`| +| consumerGroup| Consumer Group| A string that uniquely identifies the group of consumers to which this source belongs| string| | `"my-group-id"` | pollOnError| Poll On Error Behavior| What to do if kafka threw an exception while polling for new messages. There are 5 enums and the value can be one of DISCARD, ERROR_HANDLER, RECONNECT, RETRY, STOP| string| `"ERROR_HANDLER"`| | saslMechanism| SASL Mechanism| The Simple Authentication and Security Layer (SASL) Mechanism used.| string| `"PLAIN"`| | securityProtocol| Security Protocol| Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are supported| string| `"SASL_SSL"`| diff --git a/docs/modules/ROOT/pages/rabbitmq-source.adoc b/docs/modules/ROOT/pages/rabbitmq-source.adoc index 996a1c7e8..1eabb7b07 100644 --- a/docs/modules/ROOT/pages/rabbitmq-source.adoc +++ b/docs/modules/ROOT/pages/rabbitmq-source.adoc @@ -13,11 +13,12 @@ The following table summarizes the configuration options available for the `rabb [width="100%",cols="2,^2,3,^2,^2,^3",options="header"] |=== | Property| Name| Description| Type| Default| Example -| *addresses {empty}* *| Addresses| Comma separated list of RabbitMQ broker addresses| string| | +| *addresses {empty}* *| Addresses| Comma separated list of RabbitMQ broker addresses| string| | `"localhost:5672"` | *exchangeName {empty}* *| Exchange name| The exchange name determines the exchange the queue will be bound to| string| | -| *password {empty}* *| Password| The password to access the RabbitMQ server| string| | -| *username {empty}* *| Username| The username to access the RabbitMQ server| string| | -| portNumber| Port Number| Port of the RabbitMQ server| string| `5672`| +| password| Password| The password to access the RabbitMQ server| string| | +| queue| Queue name| The queue to receive messages from| string| | +| routingKey| Routing Key| The routing key to use when binding a consumer queue to the exchange| string| | +| username| Username| The username to access the RabbitMQ server| string| | |=== NOTE: Fields marked with ({empty}*) are mandatory. @@ -44,10 +45,8 @@ spec: apiVersion: camel.apache.org/v1alpha1 name: rabbitmq-source properties: - addresses: "The Addresses" + addresses: "localhost:5672" exchangeName: "The Exchange name" - password: "The Password" - username: "The Username" sink: ref: kind: InMemoryChannel @@ -72,7 +71,7 @@ The procedure described above can be simplified into a single execution of the ` [source,shell] ---- -kamel bind rabbitmq-source -p "source.addresses=The Addresses" -p "source.exchangeName=The Exchange name" -p "source.password=The Password" -p "source.username=The Username" channel/mychannel +kamel bind rabbitmq-source -p "source.addresses=localhost:5672" -p "source.exchangeName=The Exchange name" channel/mychannel ---- This will create the KameletBinding under the hood and apply it to the current namespace in the cluster. @@ -95,10 +94,8 @@ spec: apiVersion: camel.apache.org/v1alpha1 name: rabbitmq-source properties: - addresses: "The Addresses" + addresses: "localhost:5672" exchangeName: "The Exchange name" - password: "The Password" - username: "The Username" sink: ref: kind: KafkaTopic @@ -125,7 +122,7 @@ The procedure described above can be simplified into a single execution of the ` [source,shell] ---- -kamel bind rabbitmq-source -p "source.addresses=The Addresses" -p "source.exchangeName=The Exchange name" -p "source.password=The Password" -p "source.username=The Username" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic +kamel bind rabbitmq-source -p "source.addresses=localhost:5672" -p "source.exchangeName=The Exchange name" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic ---- This will create the KameletBinding under the hood and apply it to the current namespace in the cluster. diff --git a/docs/modules/ROOT/pages/telegram-source.adoc b/docs/modules/ROOT/pages/telegram-source.adoc index 5283d47c7..bfefbce12 100644 --- a/docs/modules/ROOT/pages/telegram-source.adoc +++ b/docs/modules/ROOT/pages/telegram-source.adoc @@ -9,6 +9,10 @@ Receive all messages that people send to your Telegram bot. To create a bot, contact the @botfather account using the Telegram app. +The source attaches the following headers to the messages: + +- `chat-id` / `ce-chat-id`: the ID of the chat where the message comes from + == Configuration Options The following table summarizes the configuration options available for the `telegram-source` Kamelet: diff --git a/templates/bindings/camel-k/rabbitmq-source-binding.yaml b/templates/bindings/camel-k/rabbitmq-source-binding.yaml index dd39500ef..87c2ac267 100644 --- a/templates/bindings/camel-k/rabbitmq-source-binding.yaml +++ b/templates/bindings/camel-k/rabbitmq-source-binding.yaml @@ -9,10 +9,8 @@ spec: apiVersion: camel.apache.org/v1alpha1 name: rabbitmq-source properties: - addresses: "The Addresses" + addresses: "localhost:5672" exchangeName: "The Exchange name" - password: "The Password" - username: "The Username" sink: ref: kind: KafkaTopic diff --git a/templates/bindings/core/rabbitmq-source-binding.yaml b/templates/bindings/core/rabbitmq-source-binding.yaml index 180e242a9..a01d58ef6 100644 --- a/templates/bindings/core/rabbitmq-source-binding.yaml +++ b/templates/bindings/core/rabbitmq-source-binding.yaml @@ -2,10 +2,8 @@ from: uri: "kamelet:rabbitmq-source" parameters: - addresses: "The Addresses" + addresses: "localhost:5672" exchangeName: "The Exchange name" - password: "The Password" - username: "The Username" steps: - to: uri: "log:info" From 4539996c7f77dc027b003a9cd40ce9513c36d59a Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 13 Sep 2021 15:37:51 +0200 Subject: [PATCH 4/5] AWS S3 Streaming Upload Kamelet: Support also StreamingUploadTimeout parameter --- aws-s3-streaming-upload-sink.kamelet.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-s3-streaming-upload-sink.kamelet.yaml b/aws-s3-streaming-upload-sink.kamelet.yaml index 2d25ef8b5..0f57d5272 100644 --- a/aws-s3-streaming-upload-sink.kamelet.yaml +++ b/aws-s3-streaming-upload-sink.kamelet.yaml @@ -108,5 +108,5 @@ spec: batchSize: "{{batchSize}}" namingStrategy: "{{namingStrategy}}" keyName: "{{keyName}}" - streamingUploadMode: "{{?streamingUploadTimeout}}" + streamingUploadTimeout: "{{?streamingUploadTimeout}}" From 6132ec1d11d98737daece2c82aa11dc58ef4ec91 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 13 Sep 2021 15:38:31 +0200 Subject: [PATCH 5/5] AWS S3 Streaming Upload Kamelet: Support also StreamingUploadTimeout parameter --- .../kamelets/aws-s3-streaming-upload-sink.kamelet.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml index 2d25ef8b5..0f57d5272 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml @@ -108,5 +108,5 @@ spec: batchSize: "{{batchSize}}" namingStrategy: "{{namingStrategy}}" keyName: "{{keyName}}" - streamingUploadMode: "{{?streamingUploadTimeout}}" + streamingUploadTimeout: "{{?streamingUploadTimeout}}"