Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changelog/feature-kinesis-long-poll-ops.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "feature",
"category": "aws-cpp-sdk-kinesis",
"contributor": "sbiscigl",
"description": "Treat Kinesis ReceiveQueueRecords and ReceiveDeadLetterQueueRecords as long-polling operations, so they back off when the retry quota is exhausted."
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ReceiveDeadLetterQueueRecordsRequest : public KinesisRequest {
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ReceiveDeadLetterQueueRecords"; }

inline virtual bool IsLongPollingOperation() const override { return true; }
AWS_KINESIS_API Aws::String SerializePayload() const override;

AWS_KINESIS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ReceiveQueueRecordsRequest : public KinesisRequest {
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ReceiveQueueRecords"; }

inline virtual bool IsLongPollingOperation() const override { return true; }
AWS_KINESIS_API Aws::String SerializePayload() const override;

AWS_KINESIS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,8 @@ void convertOperations() {
private static final Map<String, Set<String>> LONG_POLLING_OPERATIONS = ImmutableMap.of(
"SQS", ImmutableSet.of("ReceiveMessage"),
"SFN", ImmutableSet.of("GetActivityTask"),
"SWF", ImmutableSet.of("PollForActivityTask", "PollForDecisionTask")
"SWF", ImmutableSet.of("PollForActivityTask", "PollForDecisionTask"),
"Kinesis", ImmutableSet.of("ReceiveQueueRecords", "ReceiveDeadLetterQueueRecords")
);

void applyLongPollingTrait() {
Expand Down
Loading