Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15617

Reserved PubSub attributes are unintentionally passed on causing send to fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.0
    • 3.6.0
    • camel-google-pubsub
    • None
    • Unknown

    Description

      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.

      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).

      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

       

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alvinkwekel@gmail.com Alvin Kwekel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: