Skip to content

problem with TTR parameter and AWS SQS queue #511

@mfrattola

Description

@mfrattola

What steps will reproduce the problem?

I have a fifo queue on AWS SQS service.

When I try to queue an element to the queue, I receive this error from the AWS SDK

yii\base\ErrorException: The provided type for MessageAttributes -> TTR -> StringValue value was integer. The modeled type is string. in /var/www/html/pmstore/vendor/aws/aws-sdk-php/src/QueryCompatibleInputMiddleware.php:165

What's expected?

that the element would be queued

What do you get instead?

the error listed above

I notice that at line 200 of \vendor\yiisoft\yii2-queue\src\drivers\sqs\Queue.php

'MessageAttributes' => [
'TTR' => [
'DataType' => 'Number',
'StringValue' => $ttr,
],
],

If I cast $ttr to string, it works as expected

Additional info

Q A
Yii version 2.0.49.3
PHP version 7.4
Operating system Debian 11
AWS SDK 3.304.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions