From ad26edf14d19ee8f546504a7463d7e7dfe772748 Mon Sep 17 00:00:00 2001 From: Masoud Haghbin Date: Mon, 20 Nov 2023 13:35:32 +0100 Subject: [PATCH] add conditions for delay seconds --- pumps/sqs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pumps/sqs.go b/pumps/sqs.go index 2858899b7..00d23e229 100644 --- a/pumps/sqs.go +++ b/pumps/sqs.go @@ -109,6 +109,9 @@ func (s *SQSPump) WriteData(ctx context.Context, data []interface{}) error { if s.SQSConf.AWSMessageGroupID != "" { messages[i].MessageGroupId = aws.String(s.SQSConf.AWSMessageGroupID) } + if s.SQSConf.AWSDelaySeconds != 0 { + messages[i].DelaySeconds = s.SQSConf.AWSDelaySeconds + } } SQSError := s.write(ctx, messages) if SQSError != nil {