Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.20.9, 4.9.0
-
None
-
Unknown
Description
Problem
In AWS Kinesis, the iteratorType=AT_TIMESTAMP is an option that allows you to start consuming records from a stream starting at a specific point in time.
To use iteratorType=AT_TIMESTAMP, we need to request the GetShardIterator from AWS Kinesis API and specify Timestamp parameter for that request.
This message timestamp parameter must be set initially when we create AWS Kinesis Consumer.
But in current Camel implementation unfortunately we don't have such ability.
You can see in docs (https://camel.apache.org/components/next/aws2-kinesis-component.html) that all we can is to set CamelMessageTimestamp message header. This way is not suitable for initial setup of the iterator.
Apparently, the most suitable way is to set the timestamp in the URL options (like for sequenceNumber).
Steps to reproduce
You can use the example project attached to this bug.
Solution
Possible solution you can find here: https://github.com/apache/camel/commit/8772c5f2d4a57633447d2717dff53d87555b0e3b