mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(sqs): refuse a FifoQueue attribute on a standard queue (#8898)
CreateQueue now refuses a FifoQueue attribute, even false, on a queue whose name does not end in .fifo, with InvalidAttributeName "Unknown Attribute FifoQueue." as AWS does, before any queue is stored. An AWS::SQS::Queue declaring FifoQueue: false now fails and rolls back with the same message, while a FifoQueue dropped through AWS::NoValue still leaves a standard queue. Closes #8788
This commit is contained in:
1 parent
1d8499e837
commit
9d39f2941a
4 files changed
+95
No files matched your search
@@ -733,6 +733,10 @@ public class SqsService implements Resettable, ResourceProvider {
|
||||
throw new AwsException("InvalidParameterValue",
|
||||
"The name of a FIFO queue can only end with '.fifo'.", 400);
|
||||
}
|
||||
if (!hasFifoSuffix && attributes != null && attributes.containsKey("FifoQueue")) {
|
||||
// A standard queue has no FifoQueue attribute, so SQS refuses even an explicit false.
|
||||
throw new AwsException("InvalidAttributeName", "Unknown Attribute FifoQueue.", 400);
|
||||
}
|
||||
if (hasFifoSuffix && !fifoRequested) {
|
||||
// Auto-set FifoQueue attribute when name ends with .fifo
|
||||
attributes = attributes == null ? new HashMap<>() : new HashMap<>(attributes);
|
||||
|
||||
Reference in new issue
Block a user