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-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new 9858199 [create-pull-request] automated change
9858199 is described below
commit 9858199fc2e4168bdf2d11ab78241cfcfa963762
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Sep 23 00:59:41 2021 +0000
[create-pull-request] automated change
---
.../camel/springboot/catalog/components/kafka.json | 2 ++
components-starter/README.adoc | 2 ++
.../src/main/docs/kafka-starter.adoc | 3 ++-
.../springboot/KafkaComponentConfiguration.java | 21 +++++++++++++++++++++
.../kafka/springboot/KafkaComponentConverter.java | 2 ++
docs/modules/ROOT/pages/kafka-starter.adoc | 3 ++-
docs/modules/ROOT/pages/list.adoc | 2 ++
7 files changed, 33 insertions(+), 2 deletions(-)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
index 0806af5..d4ecdec 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
@@ -55,6 +55,7 @@
"partitionAssignor": { "kind": "property", "displayName": "Partition
Assignor", "group": "consumer", "label": "consumer", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "defaultValue":
"org.apache.kafka.clients.consumer.RangeAssignor", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The class name of the partition assignme [...]
"pollOnError": { "kind": "property", "displayName": "Poll On Error",
"group": "consumer", "label": "consumer", "required": false, "type": "object",
"javaType": "org.apache.camel.component.kafka.PollOnError", "enum": [
"DISCARD", "ERROR_HANDLER", "RECONNECT", "RETRY", "STOP" ], "deprecated":
false, "autowired": false, "secret": false, "defaultValue": "ERROR_HANDLER",
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "de [...]
"pollTimeoutMs": { "kind": "property", "displayName": "Poll Timeout Ms",
"group": "consumer", "label": "consumer", "required": false, "type":
"duration", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "5000", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The timeout used when polling the
KafkaConsumer." },
+ "resumeStrategy": { "kind": "property", "displayName": "Resume Strategy",
"group": "consumer", "label": "consumer", "required": false, "type": "object",
"javaType": "org.apache.camel.component.kafka.consumer.support.ResumeStrategy",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "This option allows the user to set a custom
resume strategy. The [...]
"seekTo": { "kind": "property", "displayName": "Seek To", "group":
"consumer", "label": "consumer", "required": false, "type": "string",
"javaType": "java.lang.String", "enum": [ "beginning", "end" ], "deprecated":
false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "Set if KafkaConsumer will read from beginning
or end on startup: beginning : read from beginning [...]
"sessionTimeoutMs": { "kind": "property", "displayName": "Session Timeout
Ms", "group": "consumer", "label": "consumer", "required": false, "type":
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "10000", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The timeout used to detect failures when using
Kafka's group management facilities." },
"specificAvroReader": { "kind": "property", "displayName": "Specific Avro
Reader", "group": "consumer", "label": "confluent,consumer", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "This enables the use of a specific Avro reader
for use with the Confluent Platf [...]
@@ -160,6 +161,7 @@
"partitionAssignor": { "kind": "parameter", "displayName": "Partition
Assignor", "group": "consumer", "label": "consumer", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "defaultValue":
"org.apache.kafka.clients.consumer.RangeAssignor", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The class name of the partition assignm [...]
"pollOnError": { "kind": "parameter", "displayName": "Poll On Error",
"group": "consumer", "label": "consumer", "required": false, "type": "object",
"javaType": "org.apache.camel.component.kafka.PollOnError", "enum": [
"DISCARD", "ERROR_HANDLER", "RECONNECT", "RETRY", "STOP" ], "deprecated":
false, "autowired": false, "secret": false, "defaultValue": "ERROR_HANDLER",
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration",
"configurationField": "configuration", "d [...]
"pollTimeoutMs": { "kind": "parameter", "displayName": "Poll Timeout Ms",
"group": "consumer", "label": "consumer", "required": false, "type":
"duration", "javaType": "java.lang.Long", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "5000", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The timeout used when polling the
KafkaConsumer." },
+ "resumeStrategy": { "kind": "parameter", "displayName": "Resume Strategy",
"group": "consumer", "label": "consumer", "required": false, "type": "object",
"javaType": "org.apache.camel.component.kafka.consumer.support.ResumeStrategy",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "This option allows the user to set a custom
resume strategy. The [...]
"seekTo": { "kind": "parameter", "displayName": "Seek To", "group":
"consumer", "label": "consumer", "required": false, "type": "string",
"javaType": "java.lang.String", "enum": [ "beginning", "end" ], "deprecated":
false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "Set if KafkaConsumer will read from beginning
or end on startup: beginning : read from beginning [...]
"sessionTimeoutMs": { "kind": "parameter", "displayName": "Session Timeout
Ms", "group": "consumer", "label": "consumer", "required": false, "type":
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "10000", "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "The timeout used to detect failures when using
Kafka's group management facilities." },
"specificAvroReader": { "kind": "parameter", "displayName": "Specific Avro
Reader", "group": "consumer", "label": "confluent,consumer", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField":
"configuration", "description": "This enables the use of a specific Avro reader
for use with the Confluent Plat [...]
diff --git a/components-starter/README.adoc b/components-starter/README.adoc
index 223adf7..2afe35b 100644
--- a/components-starter/README.adoc
+++ b/components-starter/README.adoc
@@ -293,6 +293,8 @@ Number of Camel components: 339 in 274 JAR artifacts (1
deprecated)
| xref:latest@components::http-component.adoc[HTTP] | camel-http-starter |
Stable | 2.3 | Send requests to external HTTP servers using Apache HTTP Client
4.x.
+| xref:latest@components::hwcloud-image-component.adoc[Huawei Cloud Image
Recognition] | camel-huaweicloud-imagerecognition-starter | Preview | 3.12 | To
identify objects, scenes, and concepts in images on Huawei Cloud
+
| xref:latest@components::hwcloud-imagerecognition-component.adoc[Huawei Cloud
Image Recognition] | camel-huaweicloud-imagerecognition-starter | Preview |
3.12 | To identify objects, scenes, and concepts in images on Huawei Cloud
| xref:latest@components::hwcloud-dms-component.adoc[Huawei Distributed
Message Service (DMS)] | camel-huaweicloud-dms-starter | Preview | 3.12 | To
integrate with a fully managed, high-performance message queuing service on
Huawei Cloud
diff --git
a/components-starter/camel-kafka-starter/src/main/docs/kafka-starter.adoc
b/components-starter/camel-kafka-starter/src/main/docs/kafka-starter.adoc
index 3e090c0..3c43054 100644
--- a/components-starter/camel-kafka-starter/src/main/docs/kafka-starter.adoc
+++ b/components-starter/camel-kafka-starter/src/main/docs/kafka-starter.adoc
@@ -17,7 +17,7 @@ When using kafka with Spring Boot make sure to use the
following Maven dependenc
----
-The component supports 104 options, which are listed below.
+The component supports 105 options, which are listed below.
@@ -93,6 +93,7 @@ The component supports 104 options, which are listed below.
| *camel.component.kafka.record-metadata* | Whether the producer should store
the RecordMetadata results from sending to Kafka. The results are stored in a
List containing the RecordMetadata metadata's. The list is stored on a header
with the key KafkaConstants#KAFKA_RECORDMETA | true | Boolean
| *camel.component.kafka.request-required-acks* | The number of
acknowledgments the producer requires the leader to have received before
considering a request complete. This controls the durability of records that
are sent. The following settings are common: acks=0 If set to zero then the
producer will not wait for any acknowledgment from the server at all. The
record will be immediately added to the socket buffer and considered sent. No
guarantee can be made that the server has received [...]
| *camel.component.kafka.request-timeout-ms* | The amount of time the broker
will wait trying to meet the request.required.acks requirement before sending
back an error to the client. | 30000 | Integer
+| *camel.component.kafka.resume-strategy* | This option allows the user to set
a custom resume strategy. The resume strategy is executed when partitions are
assigned (i.e.: when connecting or reconnecting). It allows implementations to
customize how to resume operations and serve as more flexible alternative to
the seekTo and the offsetRepository mechanisms. See the ResumeStrategy for
implementation details. This option does not affect the auto commit setting. It
is likely that implement [...]
| *camel.component.kafka.retries* | Setting a value greater than zero will
cause the client to resend any record whose send fails with a potentially
transient error. Note that this retry is no different than if the client resent
the record upon receiving the error. Allowing retries will potentially change
the ordering of records because if two records are sent to a single partition,
and the first fails and is retried but the second succeeds, then the second
record may appear first. | 0 | [...]
| *camel.component.kafka.retry-backoff-ms* | Before each retry, the producer
refreshes the metadata of relevant topics to see if a new leader has been
elected. Since leader election takes a bit of time, this property specifies the
amount of time that the producer waits before refreshing the metadata. | 100 |
Integer
| *camel.component.kafka.sasl-jaas-config* | Expose the kafka sasl.jaas.config
parameter Example: org.apache.kafka.common.security.plain.PlainLoginModule
required username=USERNAME password=PASSWORD; | | String
diff --git
a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
index 86b0077..21cde73 100644
---
a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
+++
b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
@@ -25,6 +25,7 @@ import org.apache.camel.component.kafka.KafkaConfiguration;
import org.apache.camel.component.kafka.KafkaManualCommitFactory;
import org.apache.camel.component.kafka.PollExceptionStrategy;
import org.apache.camel.component.kafka.PollOnError;
+import org.apache.camel.component.kafka.consumer.support.ResumeStrategy;
import org.apache.camel.component.kafka.serde.KafkaHeaderDeserializer;
import org.apache.camel.component.kafka.serde.KafkaHeaderSerializer;
import org.apache.camel.spi.HeaderFilterStrategy;
@@ -284,6 +285,18 @@ public class KafkaComponentConfiguration
*/
private Long pollTimeoutMs = 5000L;
/**
+ * This option allows the user to set a custom resume strategy. The resume
+ * strategy is executed when partitions are assigned (i.e.: when connecting
+ * or reconnecting). It allows implementations to customize how to resume
+ * operations and serve as more flexible alternative to the seekTo and the
+ * offsetRepository mechanisms. See the ResumeStrategy for implementation
+ * details. This option does not affect the auto commit setting. It is
+ * likely that implementations using this setting will also want to
evaluate
+ * using the manual commit option along with this. The option is a
+ * org.apache.camel.component.kafka.consumer.support.ResumeStrategy type.
+ */
+ private ResumeStrategy resumeStrategy;
+ /**
* Set if KafkaConsumer will read from beginning or end on startup:
* beginning : read from beginning end : read from end This is replacing
the
* earlier property seekToBeginning
@@ -1015,6 +1028,14 @@ public class KafkaComponentConfiguration
this.pollTimeoutMs = pollTimeoutMs;
}
+ public ResumeStrategy getResumeStrategy() {
+ return resumeStrategy;
+ }
+
+ public void setResumeStrategy(ResumeStrategy resumeStrategy) {
+ this.resumeStrategy = resumeStrategy;
+ }
+
public String getSeekTo() {
return seekTo;
}
diff --git
a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConverter.java
b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConverter.java
index 9135a7f..eaebdd5 100644
---
a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConverter.java
+++
b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConverter.java
@@ -45,6 +45,7 @@ public class KafkaComponentConverter implements
GenericConverter {
answer.add(new ConvertiblePair(String.class,
org.apache.camel.spi.HeaderFilterStrategy.class));
answer.add(new ConvertiblePair(String.class,
org.apache.camel.component.kafka.serde.KafkaHeaderDeserializer.class));
answer.add(new ConvertiblePair(String.class,
org.apache.camel.spi.StateRepository.class));
+ answer.add(new ConvertiblePair(String.class,
org.apache.camel.component.kafka.consumer.support.ResumeStrategy.class));
answer.add(new ConvertiblePair(String.class,
org.apache.camel.component.kafka.KafkaManualCommitFactory.class));
answer.add(new ConvertiblePair(String.class,
org.apache.camel.component.kafka.PollExceptionStrategy.class));
answer.add(new ConvertiblePair(String.class,
org.apache.camel.component.kafka.serde.KafkaHeaderSerializer.class));
@@ -71,6 +72,7 @@ public class KafkaComponentConverter implements
GenericConverter {
case "org.apache.camel.spi.HeaderFilterStrategy": return
applicationContext.getBean(ref,
org.apache.camel.spi.HeaderFilterStrategy.class);
case
"org.apache.camel.component.kafka.serde.KafkaHeaderDeserializer": return
applicationContext.getBean(ref,
org.apache.camel.component.kafka.serde.KafkaHeaderDeserializer.class);
case "org.apache.camel.spi.StateRepository": return
applicationContext.getBean(ref, org.apache.camel.spi.StateRepository.class);
+ case
"org.apache.camel.component.kafka.consumer.support.ResumeStrategy": return
applicationContext.getBean(ref,
org.apache.camel.component.kafka.consumer.support.ResumeStrategy.class);
case "org.apache.camel.component.kafka.KafkaManualCommitFactory":
return applicationContext.getBean(ref,
org.apache.camel.component.kafka.KafkaManualCommitFactory.class);
case "org.apache.camel.component.kafka.PollExceptionStrategy":
return applicationContext.getBean(ref,
org.apache.camel.component.kafka.PollExceptionStrategy.class);
case
"org.apache.camel.component.kafka.serde.KafkaHeaderSerializer": return
applicationContext.getBean(ref,
org.apache.camel.component.kafka.serde.KafkaHeaderSerializer.class);
diff --git a/docs/modules/ROOT/pages/kafka-starter.adoc
b/docs/modules/ROOT/pages/kafka-starter.adoc
index 3e090c0..3c43054 100644
--- a/docs/modules/ROOT/pages/kafka-starter.adoc
+++ b/docs/modules/ROOT/pages/kafka-starter.adoc
@@ -17,7 +17,7 @@ When using kafka with Spring Boot make sure to use the
following Maven dependenc
----
-The component supports 104 options, which are listed below.
+The component supports 105 options, which are listed below.
@@ -93,6 +93,7 @@ The component supports 104 options, which are listed below.
| *camel.component.kafka.record-metadata* | Whether the producer should store
the RecordMetadata results from sending to Kafka. The results are stored in a
List containing the RecordMetadata metadata's. The list is stored on a header
with the key KafkaConstants#KAFKA_RECORDMETA | true | Boolean
| *camel.component.kafka.request-required-acks* | The number of
acknowledgments the producer requires the leader to have received before
considering a request complete. This controls the durability of records that
are sent. The following settings are common: acks=0 If set to zero then the
producer will not wait for any acknowledgment from the server at all. The
record will be immediately added to the socket buffer and considered sent. No
guarantee can be made that the server has received [...]
| *camel.component.kafka.request-timeout-ms* | The amount of time the broker
will wait trying to meet the request.required.acks requirement before sending
back an error to the client. | 30000 | Integer
+| *camel.component.kafka.resume-strategy* | This option allows the user to set
a custom resume strategy. The resume strategy is executed when partitions are
assigned (i.e.: when connecting or reconnecting). It allows implementations to
customize how to resume operations and serve as more flexible alternative to
the seekTo and the offsetRepository mechanisms. See the ResumeStrategy for
implementation details. This option does not affect the auto commit setting. It
is likely that implement [...]
| *camel.component.kafka.retries* | Setting a value greater than zero will
cause the client to resend any record whose send fails with a potentially
transient error. Note that this retry is no different than if the client resent
the record upon receiving the error. Allowing retries will potentially change
the ordering of records because if two records are sent to a single partition,
and the first fails and is retried but the second succeeds, then the second
record may appear first. | 0 | [...]
| *camel.component.kafka.retry-backoff-ms* | Before each retry, the producer
refreshes the metadata of relevant topics to see if a new leader has been
elected. Since leader election takes a bit of time, this property specifies the
amount of time that the producer waits before refreshing the metadata. | 100 |
Integer
| *camel.component.kafka.sasl-jaas-config* | Expose the kafka sasl.jaas.config
parameter Example: org.apache.kafka.common.security.plain.PlainLoginModule
required username=USERNAME password=PASSWORD; | | String
diff --git a/docs/modules/ROOT/pages/list.adoc
b/docs/modules/ROOT/pages/list.adoc
index 223adf7..2afe35b 100644
--- a/docs/modules/ROOT/pages/list.adoc
+++ b/docs/modules/ROOT/pages/list.adoc
@@ -293,6 +293,8 @@ Number of Camel components: 339 in 274 JAR artifacts (1
deprecated)
| xref:latest@components::http-component.adoc[HTTP] | camel-http-starter |
Stable | 2.3 | Send requests to external HTTP servers using Apache HTTP Client
4.x.
+| xref:latest@components::hwcloud-image-component.adoc[Huawei Cloud Image
Recognition] | camel-huaweicloud-imagerecognition-starter | Preview | 3.12 | To
identify objects, scenes, and concepts in images on Huawei Cloud
+
| xref:latest@components::hwcloud-imagerecognition-component.adoc[Huawei Cloud
Image Recognition] | camel-huaweicloud-imagerecognition-starter | Preview |
3.12 | To identify objects, scenes, and concepts in images on Huawei Cloud
| xref:latest@components::hwcloud-dms-component.adoc[Huawei Distributed
Message Service (DMS)] | camel-huaweicloud-dms-starter | Preview | 3.12 | To
integrate with a fully managed, high-performance message queuing service on
Huawei Cloud