You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/10/07 04:21:00 UTC

[jira] [Resolved] (CAMEL-15617) Reserved PubSub attributes are unintentionally passed on causing send to fail

     [ https://issues.apache.org/jira/browse/CAMEL-15617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-15617.
---------------------------------
    Fix Version/s: 3.6.0
       Resolution: Fixed

> Reserved PubSub attributes are unintentionally passed on causing send to fail
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-15617
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15617
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-google-pubsub
>    Affects Versions: 3.5.0
>            Reporter: Alvin Kwekel
>            Priority: Major
>             Fix For: 3.6.0
>
>
> When Camel receives a PubSub message with reserved Google PubSub attributes these are set on a Camel header and passed on to any message sender. These reserved attributes are not allowed to be set on an outgoing message so this throws an error.
> {code:java}
> INVALID_ARGUMENT: The request contains an attribute key that is not valid (key=googclient_deliveryattempt). Attribute keys must be non-empty and must not begin with 'goog' (case-insensitive).{code}
> 1) We can filter out these reserved attributes before sending.
> 2) We could also use another Camel header to store the reserved attributes which will not be used when sending.
> 3) We could also map all attributes to headers and vice versa like we do with other transports. The real issues with this is that PubSub only supports string values as attributes. And we still need to filter out the reserved attributes.
> I think we should implement option 1 regardless, to make sure this never cause issues again. Perhaps combine it with option 2 to map to "googclient_deliveryattempt" attribute to the "CamelGooglePubsub.DeliveryAttempt" header.
> I've already prepared a fix based on the proposed solution 1: [https://github.com/apache/camel/pull/4343]
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)