You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/03/16 19:13:11 UTC

[camel] 22/33: CAMEL-17792: Add doc about the message headers of camel-aws2-s3

This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 3ac5cc603653e9bee93654e469d07fcffc7faedd
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Wed Mar 16 13:18:26 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-aws2-s3
---
 .../apache/camel/component/aws2/s3/aws2-s3.json    |  27 +++++
 .../src/main/docs/aws2-s3-component.adoc           | 112 +--------------------
 .../camel/component/aws2/s3/AWS2S3Constants.java   |  74 ++++++++++++++
 .../camel/component/aws2/s3/AWS2S3Consumer.java    |   2 +-
 .../camel/component/aws2/s3/AWS2S3Endpoint.java    |   3 +-
 5 files changed, 107 insertions(+), 111 deletions(-)

diff --git a/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json b/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
index 546a6cc..dbdd256 100644
--- a/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
+++ b/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
@@ -73,6 +73,33 @@
     "accessKey": { "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
     "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   },
+  "headers": {
+    "CamelAwsS3BucketName": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Name which this object will be stored or which will be used for the current operation or in which this object is contained." },
+    "CamelAwsS3BucketDestinationName": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Destination Name which will be used for the current operation" },
+    "CamelAwsS3ContentControl": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The *optional* Cache-Control HTTP header which allows the user to\nspecify caching behavior along the HTTP request\/reply chain." },
+    "CamelAwsS3ContentDisposition": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The *optional* Content-Disposition HTTP header, which specifies\npresentational information such as the recommended filename for the\nobject to be saved as." },
+    "CamelAwsS3ContentEncoding": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The *optional* Content-Encoding HTTP header specifying what content\nencodings have been applied to the object and what decoding mechanisms\nmust be applied in order to obtain the media-type referenced by the\nContent-Type field." },
+    "CamelAwsS3ContentLength": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Length HTTP header indicating the size of the associated\nobject in bytes." },
+    "CamelAwsS3ContentMD5": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The base64 encoded 128-bit MD5 digest of the associated object (content\n- not including headers) according to RFC 1864. This data is used as a\nmessage integrity check to verify that the data received by Amazon S3 is\nthe same data that the caller sent." },
+    "CamelAwsS3ContentType": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Type HTTP header, which indicates the type of content stored\nin the associated object. The value of this header is a standard MIME\ntype." },
+    "CamelAwsS3ETag": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The ETag value for the newly uploaded object.\n(consumer) The hex encoded 128-bit MD5 digest of the associated object according to\nRFC 1864. This data is used as an integrity check to verify that the\ndata received by the caller is the same data tha [...]
+    "CamelAwsS3Key": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key under which this object is stored or will be stored or which will be used for the current operation" },
+    "CamelAwsS3DestinationKey": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Destination key which will be used for the current operation" },
+    "CamelAwsS3LastModified": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value of the Last-Modified header, indicating the date and time at\nwhich Amazon S3 last recorded a modification to the associated object." },
+    "CamelAwsS3StorageClass": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The storage class of this object." },
+    "CamelAwsS3VersionId": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The *optional* version ID of the newly uploaded object.\n(consumer) The version ID of the associated Amazon S3 object if available. Version\nIDs are only assigned to objects when an object is uploaded to an Amazon\nS3 bucket that has object vers [...]
+    "CamelAwsS3CannedAcl": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The canned acl that will be applied to the object. see\n`software.amazon.awssdk.services.s3.model.ObjectCannedACL` for allowed\nvalues." },
+    "CamelAwsS3Acl": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.BucketCannedACL", "enum": [ "private", "public-read", "public-read-write", "authenticated-read", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A well constructed Amazon S3 Access Control List object." },
+    "CamelAwsS3Operation": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform. Permitted values are copyObject, deleteObject, listBuckets, deleteBucket, listObjects" },
+    "CamelAwsS3ServerSideEncryption": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the server-side encryption algorithm when encrypting\nthe object using AWS-managed keys. For example use AES256." },
+    "CamelAwsS3ExpirationTime": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header." },
+    "CamelAwsS3ReplicationStatus": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.ReplicationStatus", "enum": [ "COMPLETE", "PENDING", "FAILED", "REPLICA", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule." },
+    "CamelAwsS3RangeStart": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the first byte to get" },
+    "CamelAwsS3RangeEnd": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the last byte to get" },
+    "CamelAwsS3DowloadLinkExpirationTime": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiration time of the download link in milliseconds" },
+    "CamelAwsS3Metadata": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A map of metadata to be stored or stored with the object in S3. More details about\nmetadata https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/UsingMetadata.html[here]." },
+    "CamelMessageTimestamp": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message" }
+  },
   "properties": {
     "bucketNameOrArn": { "kind": "path", "displayName": "Bucket Name Or Arn", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Bucket name or ARN" },
     "amazonS3Client": { "kind": "parameter", "displayName": "Amazon S3 Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.s3.S3Client", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Reference to a com.amazonaws.services.s3.AmazonS3 in the registry." },
diff --git a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
index fcc18e7..217c7bc 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
+++ b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
@@ -72,115 +72,9 @@ from("aws2-s3://helloBucket?accessKey=yourAccessKey&secretKey=yourSecretKey&pref
   .to("file:/var/downloaded");
 --------------------------------------------------------------------------------
 
-=== Message headers evaluated by the S3 producer
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Header |Type |Description
-
-|`CamelAwsS3BucketName` |`String` |The bucket Name which this object will be stored or which will be used for the current operation
-
-|`CamelAwsS3BucketDestinationName` |`String` |The bucket Destination Name which will be used for the current operation
-
-|`CamelAwsS3ContentLength` |`Long` |The content length of this object.
-
-|`CamelAwsS3ContentType` |`String` |The content type of this object.
-
-|`CamelAwsS3ContentControl` |`String` |The content control of this object.
-
-|`CamelAwsS3ContentDisposition` |`String` |The content disposition of this object.
-
-|`CamelAwsS3ContentEncoding` |`String` |The content encoding of this object.
-
-|`CamelAwsS3ContentMD5` |`String` |The md5 checksum of this object.
-
-|`CamelAwsS3DestinationKey` |`String` |The Destination key which will be used for the current operation
-
-|`CamelAwsS3Key` |`String` |The key under which this object will be stored or which will be used for the current operation
-
-|`CamelAwsS3LastModified` |`java.util.Date` |The last modified timestamp of this object.
-
-|`CamelAwsS3Operation` |`String` |The operation to perform. Permitted values are copyObject, deleteObject, listBuckets, deleteBucket, listObjects
-
-|`CamelAwsS3StorageClass` |`String` |The storage class of this object.
-
-|`CamelAwsS3CannedAcl` |`String` |The canned acl that will be applied to the object. see
-`software.amazon.awssdk.services.s3.model.ObjectCannedACL` for allowed
-values.
-
-|`CamelAwsS3Acl` |`software.amazon.awssdk.services.s3.model.BucketCannedACL` |A well constructed Amazon S3 Access Control List object.
-see `software.amazon.awssdk.services.s3.model.BucketCannedACL` for more details
-
-|`CamelAwsS3ServerSideEncryption` |String |Sets the server-side encryption algorithm when encrypting
-the object using AWS-managed keys. For example use AES256.
-
-|`CamelAwsS3VersionId` |`String` |The version Id of the object to be stored or returned from the current operation
-|`CamelAwsS3Metadata` |`Map<String, String>` |A map of metadata to be stored with the object in S3. More details about
-metadata https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html[here].
-|=======================================================================
-
-=== Message headers set by the S3 producer
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Header |Type |Description
-|`CamelAwsS3ETag` |`String` |The ETag value for the newly uploaded object.
-
-|`CamelAwsS3VersionId` |`String` |The *optional* version ID of the newly uploaded object.
-
-
-|=======================================================================
-
-=== Message headers set by the S3 consumer
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Header |Type |Description
-
-|`CamelAwsS3Key` |`String` |The key under which this object is stored.
-
-|`CamelAwsS3BucketName` |`String` |The name of the bucket in which this object is contained.
-
-|`CamelAwsS3ETag` |`String` |The hex encoded 128-bit MD5 digest of the associated object according to
-RFC 1864. This data is used as an integrity check to verify that the
-data received by the caller is the same data that was sent by Amazon S3.
-
-|`CamelAwsS3LastModified` |`Date` |The value of the Last-Modified header, indicating the date and time at
-which Amazon S3 last recorded a modification to the associated object.
-
-|`CamelAwsS3VersionId` |`String` |The version ID of the associated Amazon S3 object if available. Version
-IDs are only assigned to objects when an object is uploaded to an Amazon
-S3 bucket that has object versioning enabled.
-
-|`CamelAwsS3ContentType` |`String` |The Content-Type HTTP header, which indicates the type of content stored
-in the associated object. The value of this header is a standard MIME
-type.
-
-|`CamelAwsS3ContentMD5` |`String` |The base64 encoded 128-bit MD5 digest of the associated object (content
-- not including headers) according to RFC 1864. This data is used as a
-message integrity check to verify that the data received by Amazon S3 is
-the same data that the caller sent.
-
-|`CamelAwsS3ContentLength` |`Long` |The Content-Length HTTP header indicating the size of the associated
-object in bytes.
-
-|`CamelAwsS3ContentEncoding` |`String` |The *optional* Content-Encoding HTTP header specifying what content
-encodings have been applied to the object and what decoding mechanisms
-must be applied in order to obtain the media-type referenced by the
-Content-Type field.
-
-|`CamelAwsS3ContentDisposition` |`String` |The *optional* Content-Disposition HTTP header, which specifies
-presentational information such as the recommended filename for the
-object to be saved as.
-
-|`CamelAwsS3ContentControl` |`String` |The *optional* Cache-Control HTTP header which allows the user to
-specify caching behavior along the HTTP request/reply chain.
-
-|`CamelAwsS3ServerSideEncryption` |String |The server-side encryption algorithm when encrypting the
-object using AWS-managed keys.
-|`CamelAwsS3Metadata` |`Map<String, String>` |A map of metadata stored with the object in S3. More details about
-metadata https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html[here].
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 === S3 Producer operations
 
diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java
index a14d23c..b8a914c 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java
@@ -16,33 +16,107 @@
  */
 package org.apache.camel.component.aws2.s3;
 
+import org.apache.camel.Exchange;
+import org.apache.camel.spi.Metadata;
+
 /**
  * Constants used in Camel AWS2 S3 module
  */
 public interface AWS2S3Constants {
 
+    @Metadata(description = "The bucket Name which this object will be stored or which will be used for the current operation or in which this object is contained.",
+              javaType = "String")
     String BUCKET_NAME = "CamelAwsS3BucketName";
+    @Metadata(label = "producer", description = "The bucket Destination Name which will be used for the current operation",
+              javaType = "String")
     String BUCKET_DESTINATION_NAME = "CamelAwsS3BucketDestinationName";
+    @Metadata(description = "The *optional* Cache-Control HTTP header which allows the user to\n" +
+                            "specify caching behavior along the HTTP request/reply chain.",
+              javaType = "String")
     String CACHE_CONTROL = "CamelAwsS3ContentControl";
+    @Metadata(description = "The *optional* Content-Disposition HTTP header, which specifies\n" +
+                            "presentational information such as the recommended filename for the\n" +
+                            "object to be saved as.",
+              javaType = "String")
     String CONTENT_DISPOSITION = "CamelAwsS3ContentDisposition";
+    @Metadata(description = "The *optional* Content-Encoding HTTP header specifying what content\n" +
+                            "encodings have been applied to the object and what decoding mechanisms\n" +
+                            "must be applied in order to obtain the media-type referenced by the\n" +
+                            "Content-Type field.",
+              javaType = "String")
     String CONTENT_ENCODING = "CamelAwsS3ContentEncoding";
+    @Metadata(description = "The Content-Length HTTP header indicating the size of the associated\n" +
+                            "object in bytes.",
+              javaType = "Long")
     String CONTENT_LENGTH = "CamelAwsS3ContentLength";
+    @Metadata(description = "The base64 encoded 128-bit MD5 digest of the associated object (content\n" +
+                            "- not including headers) according to RFC 1864. This data is used as a\n" +
+                            "message integrity check to verify that the data received by Amazon S3 is\n" +
+                            "the same data that the caller sent.",
+              javaType = "String")
     String CONTENT_MD5 = "CamelAwsS3ContentMD5";
+    @Metadata(description = "The Content-Type HTTP header, which indicates the type of content stored\n" +
+                            "in the associated object. The value of this header is a standard MIME\n" +
+                            "type.",
+              javaType = "String")
     String CONTENT_TYPE = "CamelAwsS3ContentType";
+    @Metadata(description = "(producer) The ETag value for the newly uploaded object.\n" +
+                            "(consumer) The hex encoded 128-bit MD5 digest of the associated object according to\n" +
+                            "RFC 1864. This data is used as an integrity check to verify that the\n" +
+                            "data received by the caller is the same data that was sent by Amazon S3.",
+              javaType = "String")
     String E_TAG = "CamelAwsS3ETag";
+    @Metadata(description = "The key under which this object is stored or will be stored or which will be used for the current operation",
+              javaType = "String")
     String KEY = "CamelAwsS3Key";
+    @Metadata(label = "producer", description = "The Destination key which will be used for the current operation",
+              javaType = "String")
     String DESTINATION_KEY = "CamelAwsS3DestinationKey";
+    @Metadata(description = "The value of the Last-Modified header, indicating the date and time at\n" +
+                            "which Amazon S3 last recorded a modification to the associated object.",
+              javaType = "Date")
     String LAST_MODIFIED = "CamelAwsS3LastModified";
+    @Metadata(description = "The storage class of this object.", javaType = "String")
     String STORAGE_CLASS = "CamelAwsS3StorageClass";
+    @Metadata(description = "(producer) The *optional* version ID of the newly uploaded object.\n" +
+                            "(consumer) The version ID of the associated Amazon S3 object if available. Version\n" +
+                            "IDs are only assigned to objects when an object is uploaded to an Amazon\n" +
+                            "S3 bucket that has object versioning enabled.",
+              javaType = "String")
     String VERSION_ID = "CamelAwsS3VersionId";
+    @Metadata(label = "producer", description = "The canned acl that will be applied to the object. see\n" +
+                                                "`software.amazon.awssdk.services.s3.model.ObjectCannedACL` for allowed\n" +
+                                                "values.",
+              javaType = "String")
     String CANNED_ACL = "CamelAwsS3CannedAcl";
+    @Metadata(label = "producer", description = "A well constructed Amazon S3 Access Control List object.",
+              javaType = "software.amazon.awssdk.services.s3.model.BucketCannedACL")
     String ACL = "CamelAwsS3Acl";
+    @Metadata(description = "The operation to perform. Permitted values are copyObject, deleteObject, listBuckets, deleteBucket, listObjects",
+              javaType = "String")
     String S3_OPERATION = "CamelAwsS3Operation";
+    @Metadata(description = "Sets the server-side encryption algorithm when encrypting\n" +
+                            "the object using AWS-managed keys. For example use AES256.",
+              javaType = "String")
     String SERVER_SIDE_ENCRYPTION = "CamelAwsS3ServerSideEncryption";
+    @Metadata(label = "consumer",
+              description = "If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header.",
+              javaType = "String")
     String EXPIRATION_TIME = "CamelAwsS3ExpirationTime";
+    @Metadata(label = "consumer",
+              description = "Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.",
+              javaType = "software.amazon.awssdk.services.s3.model.ReplicationStatus")
     String REPLICATION_STATUS = "CamelAwsS3ReplicationStatus";
+    @Metadata(label = "producer", description = "The position of the first byte to get", javaType = "String")
     String RANGE_START = "CamelAwsS3RangeStart";
+    @Metadata(label = "producer", description = "The position of the last byte to get", javaType = "String")
     String RANGE_END = "CamelAwsS3RangeEnd";
+    @Metadata(label = "producer", description = "The expiration time of the download link in milliseconds", javaType = "Long")
     String DOWNLOAD_LINK_EXPIRATION_TIME = "CamelAwsS3DowloadLinkExpirationTime";
+    @Metadata(description = "A map of metadata to be stored or stored with the object in S3. More details about\n" +
+                            "metadata https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html[here].",
+              javaType = "Map<String, String>")
     String METADATA = "CamelAwsS3Metadata";
+    @Metadata(label = "consumer", description = "The timestamp of the message", javaType = "long")
+    String MESSAGE_TIMESTAMP = Exchange.MESSAGE_TIMESTAMP;
 }
diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java
index c41bc78..ee54e12 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java
@@ -408,7 +408,7 @@ public class AWS2S3Consumer extends ScheduledBatchPollingConsumer {
         if (s3Object.response().lastModified() != null) {
             message.setHeader(AWS2S3Constants.LAST_MODIFIED, s3Object.response().lastModified());
             long ts = s3Object.response().lastModified().getEpochSecond() * 1000;
-            message.setHeader(Exchange.MESSAGE_TIMESTAMP, ts);
+            message.setHeader(AWS2S3Constants.MESSAGE_TIMESTAMP, ts);
         }
 
         /*
diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Endpoint.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Endpoint.java
index 33544be..e5692e5 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Endpoint.java
+++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Endpoint.java
@@ -41,7 +41,8 @@ import software.amazon.awssdk.services.s3.model.PutBucketPolicyRequest;
  * Store and retrieve objects from AWS S3 Storage Service using AWS SDK version 2.x.
  */
 @UriEndpoint(firstVersion = "3.2.0", scheme = "aws2-s3", title = "AWS S3 Storage Service",
-             syntax = "aws2-s3://bucketNameOrArn", category = { Category.CLOUD, Category.FILE })
+             syntax = "aws2-s3://bucketNameOrArn", category = { Category.CLOUD, Category.FILE },
+             headersClass = AWS2S3Constants.class)
 public class AWS2S3Endpoint extends ScheduledPollEndpoint {
 
     private static final Logger LOG = LoggerFactory.getLogger(AWS2S3Endpoint.class);