This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-spring-boot-4.14.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/camel-spring-boot-4.14.x by
this push:
new d53294ecf82 Regen
d53294ecf82 is described below
commit d53294ecf82c069f19293d8a4416baec858c2b93
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 6 15:55:14 2025 +0100
Regen
---
.../catalog/components/google-pubsub.json | 12 +++--
.../src/main/docs/google-pubsub.json | 6 +++
.../GooglePubsubComponentAutoConfiguration.java | 2 +-
.../GooglePubsubComponentConfiguration.java | 16 ++++++
.../springboot/GooglePubsubComponentConverter.java | 63 ++++++++++++++++++++++
...rk.boot.autoconfigure.AutoConfiguration.imports | 3 +-
6 files changed, 95 insertions(+), 7 deletions(-)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/google-pubsub.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/google-pubsub.json
index dfc3cae1488..3deebab29f2 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/google-pubsub.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/google-pubsub.json
@@ -33,7 +33,8 @@
"publisherCacheSize": { "index": 6, "kind": "property", "displayName":
"Publisher Cache Size", "group": "producer", "label": "producer", "required":
false, "type": "integer", "javaType": "int", "deprecated": false, "autowired":
false, "secret": false, "description": "Maximum number of producers to cache.
This could be increased if you have producers for lots of different topics." },
"publisherCacheTimeout": { "index": 7, "kind": "property", "displayName":
"Publisher Cache Timeout", "group": "producer", "label": "producer",
"required": false, "type": "integer", "javaType": "int", "deprecated": false,
"autowired": false, "secret": false, "description": "How many milliseconds
should each producer stay alive in the cache." },
"autowiredEnabled": { "index": 8, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"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 t [...]
- "publisherTerminationTimeout": { "index": 9, "kind": "property",
"displayName": "Publisher Termination Timeout", "group": "advanced", "label":
"advanced", "required": false, "type": "integer", "javaType": "int",
"deprecated": false, "autowired": false, "secret": false, "description": "How
many milliseconds should a producer be allowed to terminate." }
+ "publisherTerminationTimeout": { "index": 9, "kind": "property",
"displayName": "Publisher Termination Timeout", "group": "advanced", "label":
"advanced", "required": false, "type": "integer", "javaType": "int",
"deprecated": false, "autowired": false, "secret": false, "description": "How
many milliseconds should a producer be allowed to terminate." },
+ "headerFilterStrategy": { "index": 10, "kind": "property", "displayName":
"Header Filter Strategy", "group": "filter", "label": "filter", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom
org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel
message." }
},
"headers": {
"CamelGooglePubsubMessageId": { "index": 0, "kind": "header",
"displayName": "", "group": "common", "label": "", "required": false,
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The ID of the message, assigned by the
server when the message is published.", "constantName":
"org.apache.camel.component.google.pubsub.GooglePubsubConstants#MESSAGE_ID" },
@@ -59,9 +60,10 @@
"pubsubEndpoint": { "index": 12, "kind": "parameter", "displayName":
"Pubsub Endpoint", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Pub\/Sub endpoint to use. Required when using message ordering,
and ensures that messages are received in order even when multiple publishers
are used" },
"retry": { "index": 13, "kind": "parameter", "displayName": "Retry",
"group": "producer (advanced)", "label": "producer,advanced", "required":
false, "type": "object", "javaType":
"com.google.api.gax.retrying.RetrySettings", "deprecated": false, "autowired":
false, "secret": false, "description": "A custom RetrySettings to control how
the publisher handles retry-able failures" },
"serializer": { "index": 14, "kind": "parameter", "displayName":
"Serializer", "group": "producer (advanced)", "label": "producer,advanced",
"required": false, "type": "object", "javaType":
"org.apache.camel.component.google.pubsub.serializer.GooglePubsubSerializer",
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false,
"description": "A custom GooglePubsubSerializer to use for serializing message
payloads in the producer" },
- "includeAllGoogleProperties": { "index": 15, "kind": "parameter",
"displayName": "Include All Google Properties", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Whether to include all Google headers when mapping from
Pubsub to Camel Message. Setting this to true will include properties such as
x-goog etc." },
- "loggerId": { "index": 16, "kind": "parameter", "displayName": "Logger
Id", "group": "advanced", "label": "advanced", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": true, "autowired":
false, "secret": false, "description": "To use a custom logger name" },
- "authenticate": { "index": 17, "kind": "parameter", "displayName":
"Authenticate", "group": "security", "label": "security", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": true, "description": "Use Credentials
when interacting with PubSub service (no authentication is required when using
emulator)." },
- "serviceAccountKey": { "index": 18, "kind": "parameter", "displayName":
"Service Account Key", "group": "security", "label": "security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "The Service account key
that can be used as credentials for the PubSub publisher\/subscriber. It can be
loaded by default from classpath, but you can prefix with classpath:, file:, or
http: to load the resour [...]
+ "headerFilterStrategy": { "index": 15, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "advanced", "label": "advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter headers to and from Camel message." },
+ "includeAllGoogleProperties": { "index": 16, "kind": "parameter",
"displayName": "Include All Google Properties", "group": "advanced", "label":
"advanced", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Whether to include all Google headers when mapping from
Pubsub to Camel Message. Setting this to true will include properties such as
x-goog etc." },
+ "loggerId": { "index": 17, "kind": "parameter", "displayName": "Logger
Id", "group": "advanced", "label": "advanced", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": true, "autowired":
false, "secret": false, "description": "To use a custom logger name" },
+ "authenticate": { "index": 18, "kind": "parameter", "displayName":
"Authenticate", "group": "security", "label": "security", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": true, "description": "Use Credentials
when interacting with PubSub service (no authentication is required when using
emulator)." },
+ "serviceAccountKey": { "index": 19, "kind": "parameter", "displayName":
"Service Account Key", "group": "security", "label": "security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "The Service account key
that can be used as credentials for the PubSub publisher\/subscriber. It can be
loaded by default from classpath, but you can prefix with classpath:, file:, or
http: to load the resour [...]
}
}
diff --git
a/components-starter/camel-google-pubsub-starter/src/main/docs/google-pubsub.json
b/components-starter/camel-google-pubsub-starter/src/main/docs/google-pubsub.json
index 28ab49b453a..2b5a53d1941 100644
---
a/components-starter/camel-google-pubsub-starter/src/main/docs/google-pubsub.json
+++
b/components-starter/camel-google-pubsub-starter/src/main/docs/google-pubsub.json
@@ -51,6 +51,12 @@
"description": "Endpoint to use with local Pub\/Sub emulator.",
"sourceType":
"org.apache.camel.component.google.pubsub.springboot.GooglePubsubComponentConfiguration"
},
+ {
+ "name": "camel.component.google-pubsub.header-filter-strategy",
+ "type": "org.apache.camel.spi.HeaderFilterStrategy",
+ "description": "To use a custom
org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel
message. The option is a org.apache.camel.spi.HeaderFilterStrategy type.",
+ "sourceType":
"org.apache.camel.component.google.pubsub.springboot.GooglePubsubComponentConfiguration"
+ },
{
"name": "camel.component.google-pubsub.lazy-start-producer",
"type": "java.lang.Boolean",
diff --git
a/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentAutoConfiguration.java
b/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentAutoConfiguration.java
index adbc7ad9b42..08bc7753195 100644
---
a/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentAutoConfiguration.java
+++
b/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentAutoConfiguration.java
@@ -42,7 +42,7 @@ import org.springframework.context.annotation.Lazy;
@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
@EnableConfigurationProperties({ComponentConfigurationProperties.class,GooglePubsubComponentConfiguration.class})
@ConditionalOnHierarchicalProperties({"camel.component",
"camel.component.google-pubsub"})
-@AutoConfigureAfter(CamelAutoConfiguration.class)
+@AutoConfigureAfter({CamelAutoConfiguration.class,
GooglePubsubComponentConverter.class})
public class GooglePubsubComponentAutoConfiguration {
@Autowired
diff --git
a/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentConfiguration.java
b/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentConfiguration.java
index bfed413760b..afcefdffbb2 100644
---
a/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentConfiguration.java
+++
b/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentConfiguration.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.component.google.pubsub.springboot;
+import org.apache.camel.spi.HeaderFilterStrategy;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -103,6 +104,12 @@ public class GooglePubsubComponentConfiguration
* How many milliseconds should a producer be allowed to terminate.
*/
private Integer publisherTerminationTimeout;
+ /**
+ * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter
+ * header to and from Camel message. The option is a
+ * org.apache.camel.spi.HeaderFilterStrategy type.
+ */
+ private HeaderFilterStrategy headerFilterStrategy;
public Boolean getAuthenticate() {
return authenticate;
@@ -185,4 +192,13 @@ public class GooglePubsubComponentConfiguration
Integer publisherTerminationTimeout) {
this.publisherTerminationTimeout = publisherTerminationTimeout;
}
+
+ public HeaderFilterStrategy getHeaderFilterStrategy() {
+ return headerFilterStrategy;
+ }
+
+ public void setHeaderFilterStrategy(
+ HeaderFilterStrategy headerFilterStrategy) {
+ this.headerFilterStrategy = headerFilterStrategy;
+ }
}
\ No newline at end of file
diff --git
a/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentConverter.java
b/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentConverter.java
new file mode 100644
index 00000000000..4d24daac927
--- /dev/null
+++
b/components-starter/camel-google-pubsub-starter/src/main/java/org/apache/camel/component/google/pubsub/springboot/GooglePubsubComponentConverter.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.google.pubsub.springboot;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+import org.springframework.beans.factory.annotation.Autowired;
+import
org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.TypeDescriptor;
+import org.springframework.core.convert.converter.GenericConverter;
+import org.springframework.stereotype.Component;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration(proxyBeanMethods = false)
+@ConfigurationPropertiesBinding
+@Component
+public class GooglePubsubComponentConverter implements GenericConverter {
+
+ @Autowired
+ private ApplicationContext applicationContext;
+
+ public Set<ConvertiblePair> getConvertibleTypes() {
+ Set<ConvertiblePair> answer = new LinkedHashSet<>();
+ answer.add(new ConvertiblePair(String.class,
org.apache.camel.spi.HeaderFilterStrategy.class));
+ return answer;
+ }
+
+ public Object convert(
+ Object source,
+ TypeDescriptor sourceType,
+ TypeDescriptor targetType) {
+ if (source == null) {
+ return null;
+ }
+ String ref = source.toString();
+ if (!ref.startsWith("#")) {
+ return null;
+ }
+ ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
+ switch (targetType.getName()) {
+ case "org.apache.camel.spi.HeaderFilterStrategy": return
applicationContext.getBean(ref,
org.apache.camel.spi.HeaderFilterStrategy.class);
+ }
+ return null;
+ }
+}
\ No newline at end of file
diff --git
a/components-starter/camel-google-pubsub-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
b/components-starter/camel-google-pubsub-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index a2a1e225558..7e678aba5b2 100644
---
a/components-starter/camel-google-pubsub-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++
b/components-starter/camel-google-pubsub-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -15,4 +15,5 @@
## limitations under the License.
## ---------------------------------------------------------------------------
-org.apache.camel.component.google.pubsub.springboot.GooglePubsubComponentAutoConfiguration
\ No newline at end of file
+org.apache.camel.component.google.pubsub.springboot.GooglePubsubComponentAutoConfiguration
+org.apache.camel.component.google.pubsub.springboot.GooglePubsubComponentConverter