driseley commented on code in PR #19823:
URL: https://github.com/apache/camel/pull/19823#discussion_r2497937346
##########
components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubHeaderFilterStrategy.java:
##########
@@ -34,11 +34,12 @@ public GooglePubsubHeaderFilterStrategy(boolean
includeAllGoogleProperties) {
}
protected void ignoreGoogProperties() {
- String[] filterStartWith = new
String[DefaultHeaderFilterStrategy.CAMEL_FILTER_STARTS_WITH.length + 2];
+ String[] filterStartWith = new
String[DefaultHeaderFilterStrategy.CAMEL_FILTER_STARTS_WITH.length + 3];
System.arraycopy(DefaultHeaderFilterStrategy.CAMEL_FILTER_STARTS_WITH,
0,
filterStartWith, 0,
DefaultHeaderFilterStrategy.CAMEL_FILTER_STARTS_WITH.length);
filterStartWith[DefaultHeaderFilterStrategy.CAMEL_FILTER_STARTS_WITH.length] =
"x-goog";
filterStartWith[DefaultHeaderFilterStrategy.CAMEL_FILTER_STARTS_WITH.length +
1] = "X-GOOG";
+
filterStartWith[DefaultHeaderFilterStrategy.CAMEL_FILTER_STARTS_WITH.length +
2] = "goog";
setOutFilterStartsWith(filterStartWith);
setInFilterStartsWith(filterStartWith);
getOutFilter().add("google-cloud-resource-prefix");
Review Comment:
This maintains the out of the box behaviour to be compatible with Camel
4.10.x - `goog*` headers were previously filtered. The error in CAMEL-22658
was triggered simply by using a GCP Topic with a dead letter topic configured:
https://docs.cloud.google.com/pubsub/docs/dead-letter-topics, GCP then adds
various headers, including `googclient_deliveryattempt` to support this. If we
removed that, anyone else using a dead letter topic would have to configure a
custom Header Filter Strategy
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]