Skip to content

Conversation

@tayoolajide-tc
Copy link

No description provided.

putRecordRequest.setData(ByteBuffer.wrap(String.format(ticker.toString()).getBytes("UTF-8")));
putRecordRequest.setPartitionKey(randomPartitionKey());
// putting the record into the stream
kinesis.putRecord(putRecordRequest);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommendation generated by Amazon CodeGuru Reviewer

This code is using a single API operation, but a batch API operation exists. You could help improve efficiency by using the batch operation instead. The batch operation is putRecords.

putRecordRequest.setData(ByteBuffer.wrap(String.format(ticker.toString()).getBytes("UTF-8")));
putRecordRequest.setPartitionKey(randomPartitionKey());
// putting the record into the stream
kinesis.putRecord(putRecordRequest);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

This code is using a single API operation, but a batch API operation exists. You could help improve efficiency by using the batch operation instead. The batch operation is putRecords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants