From beaa223bc2089db67d455957252df42dce2a1188 Mon Sep 17 00:00:00 2001 From: yaron2 Date: Thu, 10 Nov 2022 10:08:35 -0800 Subject: [PATCH] fix deletion of sqs queue regression Signed-off-by: yaron2 --- pubsub/aws/snssqs/snssqs.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pubsub/aws/snssqs/snssqs.go b/pubsub/aws/snssqs/snssqs.go index b11a06ad8..353f8312b 100644 --- a/pubsub/aws/snssqs/snssqs.go +++ b/pubsub/aws/snssqs/snssqs.go @@ -855,13 +855,6 @@ func (s *snsSqs) Subscribe(subscribeCtx context.Context, req pubsub.SubscribeReq // Remove the handler delete(s.topicHandlers, sanitizedName) - // If we can perform management operations, remove the subscription entirely - if !s.metadata.disableEntityManagement { - // Use a background context because subscribeCtx is canceled already - // Error is logged already - _ = s.removeSnsSqsSubscription(s.ctx, subscriptionArn) - } - // If we don't have any topic left, close the poller if len(s.topicHandlers) == 0 { s.pollerCancel()