Skip to content

Commit fa0b9ce

Browse files
authored
chore: AWS SQS long polling (#377)
1 parent d783afa commit fa0b9ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/mqs/queue_awssqs.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"errors"
66
"strings"
77
"sync"
8+
"time"
89

910
"github.com/aws/aws-sdk-go-v2/config"
1011
"github.com/aws/aws-sdk-go-v2/credentials"
@@ -72,7 +73,9 @@ func (q *AWSQueue) Subscribe(ctx context.Context) (Subscription, error) {
7273
if err != nil {
7374
return nil, err
7475
}
75-
subscription := awssnssqs.OpenSubscriptionV2(ctx, q.sqsClient, q.sqsQueueURL, nil)
76+
subscription := awssnssqs.OpenSubscriptionV2(ctx, q.sqsClient, q.sqsQueueURL, &awssnssqs.SubscriptionOptions{
77+
WaitTime: 20 * time.Second,
78+
})
7679
return q.base.Subscribe(ctx, subscription)
7780
}
7881

0 commit comments

Comments
 (0)