Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit e971cbe

Browse files
Merge pull request #245 from Pocket/katerina/OSL-561
OSL-561: SQS for batch delete shareable list items
2 parents 2184d5f + f6ac9b4 commit e971cbe

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.aws/src/config/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ export const config = {
4848
listEvents: `PocketEventBridge-${environment}-ListEventTopic`,
4949
},
5050
},
51+
sqsBatchDeleteQueueName: `${name}-${environment}-Batch-Delete-Consumer-Queue`,
5152
};

.aws/src/main.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
ApplicationRedis,
1515
ApplicationRDSCluster,
1616
ApplicationSqsSnsTopicSubscription,
17+
ApplicationSQSQueue,
1718
PocketALBApplication,
1819
PocketAwsSyntheticChecks,
1920
PocketECSCodePipeline,
@@ -87,6 +88,14 @@ class ShareableListsAPI extends TerraformStack {
8788
}
8889
);
8990

91+
// SQS to queue shareable list items for deletion
92+
new ApplicationSQSQueue(this, 'batch-delete-consumer-queue', {
93+
name: config.sqsBatchDeleteQueueName,
94+
tags: config.tags,
95+
//need to set maxReceiveCount to enable DLQ
96+
maxReceiveCount: 2,
97+
});
98+
9099
const shareableListPagerduty = this.createPagerDuty();
91100

92101
const pocketApp = this.createPocketAlbApplication({

0 commit comments

Comments
 (0)