Add ApproximateArrivalTimestamp and MillisBehindLatest to Kinesis get_records response (#1715)
* Add ApproximateArrivalTimestamp to Kinesis response * Add MillisBehindLatest to Kinesis get_records response
This commit is contained in:
parent
bb6da93891
commit
46dd351965
3 changed files with 84 additions and 12 deletions
|
|
@ -80,12 +80,13 @@ class KinesisResponse(BaseResponse):
|
|||
shard_iterator = self.parameters.get("ShardIterator")
|
||||
limit = self.parameters.get("Limit")
|
||||
|
||||
next_shard_iterator, records = self.kinesis_backend.get_records(
|
||||
next_shard_iterator, records, millis_behind_latest = self.kinesis_backend.get_records(
|
||||
shard_iterator, limit)
|
||||
|
||||
return json.dumps({
|
||||
"NextShardIterator": next_shard_iterator,
|
||||
"Records": [record.to_json() for record in records]
|
||||
"Records": [record.to_json() for record in records],
|
||||
'MillisBehindLatest': millis_behind_latest
|
||||
})
|
||||
|
||||
def put_record(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue