Skip to content

SQS.createQueue does not allow FifoQueue attribute for non-FIFO queues #1331

@holtkamp

Description

@holtkamp

When creating an SQS Queue, it seems the FifoQueue attribute is only allowed for queues that end in .fifo.

//works
$result = $sqsClient->createQueue([
    'QueueName' => 'foo_queue.fifo',
    'Attributes' => [
        'FifoQueue' => 'true',
    ]
]);

//fails
$result = $sqsClient->createQueue([
    'QueueName' => 'bar_queue',
    'Attributes' => [
        'FifoQueue' => 'false',
    ]
]);

This makes it impossible to use something like:

$result = $sqsClient>createQueue([
    'QueueName' => $queueName,
    'Attributes' => [
        'FifoQueue' => $this->isFifoQueue($queueName) ? 'true' : 'false',
    ],
]);

For queues that do not end in .fifo, 'FifoQueue' => 'false' is used, resulting in:

Message: Error executing "CreateQueue" on "https://sqs.eu-west-1.amazonaws.com"; AWS HTTP error: Client error: `POST https://sqs.eu-west-1.amazonaws.com` resulted in a `400 Bad Request` response: SenderI (truncated...) InvalidAttributeName (client): Unknown Attribute FifoQueue. - SenderInvalidAttributeNameUnknown Attribute

Is this expected behaviour? This forces a user to implement it a bit like this, which seems overkill...

Metadata

Metadata

Assignees

No one assigned

    Labels

    service-apiThis issue is due to a problem in a service API, not the SDK implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions