Skip to content

Commit 086831e

Browse files
committed
[Messenger] Amazon SQS Delay has a max of 15 minutes
1 parent 7cb70ae commit 086831e

File tree

1 file changed

+2
-1
lines changed
  • src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport

1 file changed

+2
-1
lines changed

src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ public function send(string $body, array $headers, int $delay = 0, string $messa
322322
$parameters = [
323323
'QueueUrl' => $this->getQueueUrl(),
324324
'MessageBody' => $body,
325-
'DelaySeconds' => $delay,
325+
// Maximum delay is 15 minutes. See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-timers.html.
326+
'DelaySeconds' => min(900, $delay),
326327
'MessageAttributes' => [],
327328
'MessageSystemAttributes' => [],
328329
];

0 commit comments

Comments
 (0)