Skip to content

SQS: fix DelaySeconds behavior for FIFO queues on message level #12941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2025

Conversation

kn1ves
Copy link
Contributor

@kn1ves kn1ves commented Jul 31, 2025

Motivation

As reported in #12881 when a FIFO SQS queue has a default DelaySeconds value (e.g. 60 seconds), LocalStack honors an explicit SendMessage call with DelaySeconds=0 and makes the message immediately visible.

This behavior differs from AWS SQS, where a DelaySeconds=0 parameter is ignored and the queue’s default delay is applied instead.

To ensure behavior parity with AWS SQS—and prevent surprises when migrating from AWS to LocalStack—LocalStack should ignore explicit DelaySeconds=0 for FIFO queues and respect the queue’s default settings.

Changes

  • Modified the put method in FifoQueue to always use the queue level delay message setting
  • Add test to verify this behavior

@localstack-bot
Copy link
Contributor

localstack-bot commented Jul 31, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@localstack-bot localstack-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to LocalStack! Thanks for raising your first Pull Request and landing in your contributions. Our team will reach out with any reviews or feedbacks that we have shortly. We recommend joining our Slack Community and share your PR on the #community channel to share your contributions with us. Please make sure you are following our contributing guidelines and our Code of Conduct.

@gregfurman gregfurman added aws:sqs Amazon Simple Queue Service semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Jul 31, 2025
@gregfurman gregfurman added this to the 4.8 milestone Jul 31, 2025
@kn1ves
Copy link
Contributor Author

kn1ves commented Jul 31, 2025

Not letting me add labels myself, if someone with access can please add semver:patch and aws:sqs please

@baermat baermat added semver: patch Non-breaking changes which can be included in patch releases and removed semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Jul 31, 2025
Copy link
Contributor

@gregfurman gregfurman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for neat contribution 🚀 Nothing blocking this imo. Just some suggestions (that I'm not married to).

Also, to unblock the CI, can you agree to the CLA license? See bot comment #12941 (comment)

@kn1ves
Copy link
Contributor Author

kn1ves commented Jul 31, 2025

I have read the CLA Document and I hereby sign the CLA

localstack-bot added a commit that referenced this pull request Jul 31, 2025
@gregfurman
Copy link
Contributor

Also, it seems there are merge conflicts 🤔 Once they're resolved I'll merge 👍

@kn1ves
Copy link
Contributor Author

kn1ves commented Jul 31, 2025

Also, it seems there are merge conflicts 🤔 Once they're resolved I'll merge 👍

Resolved conflicts -- also ran the linter+formatter which I forgot previously. Thanks for the review :)

@gregfurman gregfurman merged commit 888e4a0 into localstack:main Jul 31, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:sqs Amazon Simple Queue Service semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants