Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Messenger] Amazon SQS Delay has a max of 15 minutes (900 seconds) #48279

Copy link
Copy link
Closed
@bluntelk

Description

@bluntelk
Issue body actions

Symfony version(s) affected

6.1

Description

as per the SQS documentation https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-timers.html

You can only specify up to 15 minutes of delay on a message

I cannot see any handling for this max value in the current code

How to reproduce

send a Messenger message with a DelayStamp that is more than 15 minutes in the future

Possible Solution

in Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\Connection::send()

https://github.com/symfony/symfony/blob/6.2/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php - line 323

do a min(900, $delay)

$parameters = [
    'QueueUrl' => $this->getQueueUrl(),
    'MessageBody' => $body,
    'DelaySeconds' => min(900, $delay),
    'MessageAttributes' => [],
    'MessageSystemAttributes' => [],
];

This would prevent the message send from failing, but, it could potentially line up a lot of messages becoming visible in the queue all at once.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.