kinesis-python icon indicating copy to clipboard operation
kinesis-python copied to clipboard

Add support to "AT_TIMESTAMP" ShardIteratorType

Open M0dM opened this issue 5 years ago • 2 comments

As documented here: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/kinesis.html#Kinesis.Client.get_shard_iterator

I think those lines may be enough to support AT_TIMESTAMP behavior. It is not tested yet.

It should be used this way:

    from kinesis.consumer import KinesisConsumer

    consumer = KinesisConsumer(stream_name='my-stream', start_at_timestamp='20190901')
    for message in consumer:
        print "Received message: {0}".format(message)

Regards, M0dM

M0dM avatar Sep 30 '19 08:09 M0dM

Codecov Report

Merging #22 into master will increase coverage by 0.58%. The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
+ Coverage   32.98%   33.56%   +0.58%     
==========================================
  Files           4        4              
  Lines         285      289       +4     
==========================================
+ Hits           94       97       +3     
- Misses        191      192       +1
Impacted Files Coverage Δ
src/kinesis/consumer.py 38.46% <83.33%> (+1.05%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2bf3551...3c526ee. Read the comment docs.

codecov-io avatar Sep 30 '19 08:09 codecov-io

I can confirm the above code is working for me.

Regards, M0dM

M0dM avatar Oct 01 '19 09:10 M0dM