Can aws Kinesis steam be used as priority queue?

Viewed 928

I am trying to figure out if there is a way to prioritize data to fetch first from the stream regardless of when it was put into the stream. For example, I am writing two types of data A and B into the stream; I want data of type A to always be ahead of type B even though type B was written into the stream first. (data is feeding on stream to AWS lambda for execution). I couldn’t find any information regarding the priority on the AWS website. The only solution I could think of was to have two steams setup and vary the read limits on them. If there is anything like priority queue/stream in Kinesis, please give me some info on it.

Thank you, Jaydeep

1 Answers

No, there's no way to do that with Kinesis. It's possible you could set PartitionKey or ExplicitHashKey to make some messages go to certain shards, where some shards are processed faster / more urgently. That's not quite the same, though.

SQS doesn't support priority queues either, unfortunately, but that SO thread has a few suggestions for alternatives.

Related