[ https://issues.apache.org/jira/browse/CAMEL-18591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luca Burgazzoli updated CAMEL-18591: ------------------------------------ Fix Version/s: 3.x > Store processing related metadata to properties instead of headers > ------------------------------------------------------------------ > > Key: CAMEL-18591 > URL: https://issues.apache.org/jira/browse/CAMEL-18591 > Project: Camel > Issue Type: Improvement > Reporter: Luca Burgazzoli > Priority: Minor > Fix For: 3.x > > > Some components rely on header values to react to exchange completion, as > example the AWS S3 component, uses the bucked name and key to delete or move > buckets on completion [1]. > As headers are often manipulated by users and may affect other downstream > processing logic, it would be better to move such information to the exchange > properties. > For backward compatibility we could add a double lookup like: > {code:java} > var name = exchange.getProperty(AWS2S3Constants.BUCKET_NAME, String.class); > if (name == null) { > name = exchange.getMessage().getHeader(AWS2S3Constants.BUCKET_NAME, > String.class); > } > {code} > [1] > https://github.com/apache/camel/blob/2263301d9701d4ddfe306ea52aa05deffdd7b0b9/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java#L314-L315 -- This message was sent by Atlassian Jira (v8.20.10#820010)