Reputation: 288
I am trying to send 1000's of messages in sequence using Amazon's Kinesis but messages being received by kinesis consumer is not in sequence. Things I have tried :
putRecord()
method to send with SequenceNumberForOrdering.
Achieved ordered sequence with this but throughput is very less.putRecords
method to send but not successful. Upvotes: 1
Views: 621
Reputation: 5659
Kinesis maintains sequence within shards, not across all shards in a stream. I am guessing you have more than 1 shard in your stream and hence observing the read records out of sequence. (You can also quickly validate this by repeating #2 with just 1 shard in your stream.)
Quote from here:
please note that Record Sequence Numbers (RSNs) are not globally tracked in the stream and are instead only tracked per shard.
Upvotes: 1