1

I have an architecture where lambda function delivers the events in a kinesis stream to a client. If the event is successfully delivered then the the event should be popped off of the queue in the kinesis stream. If the event was not successfully delivered, then it will try again in x number of minutes.

  1. How to determine if the event was successfully delivered?
  2. How to manually pop an event off the data stream queue?
  3. How to schedule a re run if unsuccessful?
  • By calling put_record / put_records, you can obtain an answer from kinesis. You have for example here a format response : [AWS Doc - Kinesis put_record](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecord.html) and you will receive a 200 response. You can't get manually a record from Kinesis, you can have a little lambda function to get the response if you want to see results. Accordingly to the response received by "put_record" / "put_records", you can do some recursive call with a chosen number of retry inside your function. – jlh91 Oct 21 '22 at 19:08

1 Answers1

2

I think you are confusing SQS with Kinesis. Kinesis does not have any "queues" nor you can't "pop" any messages from Kinesis. You have to wait till they expire themselves.

Also you have no control over what and if the clients read messages from the Kinesis stream. Its client responsibility to manage that, not you as a producer.

Marcin
  • 215,873
  • 14
  • 235
  • 294