Skip to content

Commit

Permalink
add conditions for delay seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Masoud Haghbin committed Nov 20, 2023
1 parent a75b4c8 commit ad26edf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pumps/sqs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ad26edf

Please sign in to comment.