fix(sns): apply the subscribed queue's DelaySeconds to SQS fan-out (#4170)

The SQS arm of the fan-out passed a literal 0 as the per-message
delaySeconds. On a standard queue a non-null value is an explicit
per-message delay and overrides the queue attribute, so a queue created
with DelaySeconds never withheld a published message, while a direct
SendMessage to the same queue did. SNS carries no per-message delay, so
the argument is now null and the queue default applies, as on AWS. FIFO
queues were unaffected: that branch ignores the argument.
This commit is contained in:
Mihai Blidaru authored and GitHub committed 2026-09-22 15:46:49 -04:00
1 parent 1abc817c5d
commit f07b3fd3be
4 files changed
+174 -2

No files matched your search

@@ -1677,7 +1677,7 @@ public class SnsService implements Resettable, ResourceProvider {
Map<String, MessageAttributeValue> sqsAttributes = rawDelivery
? toSqsMessageAttributes(messageAttributes)
: Collections.emptyMap();
sqsService.sendMessage(queueUrl, body, 0, messageGroupId, messageDeduplicationId, sqsAttributes, region);
sqsService.sendMessage(queueUrl, body, null, messageGroupId, messageDeduplicationId, sqsAttributes, region);
LOG.debugv("Delivered SNS message to SQS: {0} ({1}) raw={2}", sub.getEndpoint(), queueUrl, rawDelivery);
}
case "lambda" -> {