Question 19: You are working for creating a streaming solutions of the log data. Log data are the applications logs data and needs to be processed in order. You are using KPL (Kinesis Producer Library) and Kinesis

Client Library. Which of the following options can help in processing streaming data in order as they are produced?

A. Your each streamed data record must have the time included when it was generated in milliseconds.

B. To write data into Kinesis Data Stream, you will be using PutRecord API command.

C. To write data into Kinesis Data Stream, you will be using PutRecords API command.

D. We need to make sure that records are send to specific shard only.

E. Each shard also have creation time stored in its properties.

1. A,B

2. B,C

3. B,D

4. D,E

5. A,E

Correct Answer : 3 Exp : In the question requirement is that records should be processed in order. As per the given option lets check what PutRecords API command says?

PutRecords: You can use this API call when you want to write multiple records in single call and works as a data ingestion for the stream. Using each PutRecords call you can ingest upto 500 records, where each record

size can be upto 1MB and entire request size can be 5MB (including partition keys). Each shard can support writes upto 1000 records per second, upto a maximum data write total of 1MB per second.

PutRecords response includes an array of response Records. Each record in the response array directly co-relates with a record in the request array using natural ordering, from the top to bottom of the request and

response. Hence, response Records array always includes the same number of records as the request array.

This response Records array includes both successfully and unsuccessfully processed records. Kinesis data Stream attempts to process all records in each PutRecords request. A single record failure does not stop

processing of subsequent records. As a result PutRecords does not gaurntee the ordering of records. If you need to read records in the same order they are written to the stream, use PutRecord instead of PutRecords,

and write to the same Shard.

Based on this we can say clearly option-1, 5 is not required and using PutRecords API is also not satisfy the given requirement. Hence, option 2 and 4 are the correct one.

3