File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ export class SqsTransport implements Transport<SQS.Message> {
192
192
193
193
await this . subscribeQueueToMessages ( )
194
194
await this . attachPolicyToQueue ( this . sqsConfiguration . queueUrl )
195
+ await this . syncQueueAttributes ( this . sqsConfiguration . queueUrl , serviceQueueAttributes )
195
196
}
196
197
197
198
/**
@@ -337,6 +338,14 @@ export class SqsTransport implements Transport<SQS.Message> {
337
338
this . logger . info ( 'Attaching IAM policy to queue' , { policy, serviceQueueUrl : queueUrl } )
338
339
await this . sqs . setQueueAttributes ( setQueuePolicyRequest ) . promise ( )
339
340
}
341
+
342
+ private async syncQueueAttributes ( queueUrl : string , attributes : QueueAttributeMap ) : Promise < void > {
343
+ // TODO: check equality before making this call to avoid potential API rate limit
344
+ await this . sqs . setQueueAttributes ( {
345
+ QueueUrl : queueUrl ,
346
+ Attributes : attributes
347
+ } ) . promise ( )
348
+ }
340
349
}
341
350
342
351
function calculateVisibilityTimeout ( sqsMessage : SQS . Message ) : Seconds {
You can’t perform that action at this time.
0 commit comments