Skip to content
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

SQS issue with new AWS sdk #20082

Closed
mahran419 opened this issue Dec 13, 2023 · 2 comments
Closed

SQS issue with new AWS sdk #20082

mahran419 opened this issue Dec 13, 2023 · 2 comments

Comments

@mahran419
Copy link

mahran419 commented Dec 13, 2023

What steps will reproduce the problem?

after upgrading AWS SDK the SQS Queue TTR will received only as a string and the SQS driver in yii is sent as an integer.

What is the expected result?

Error: The provided type for MessageAttributes -> TTR -> StringValue value was integer. The modeled type is string.

Additional info

must be casting the TTR value as a string to prevent the exception in pushMessage function in yiisoft/yii2-queue/src/drivers/sqs/Queue.php or override the class and make your changed

$request = [ 'QueueUrl' => $this->url, 'MessageBody' => $message, 'DelaySeconds' => $delay, 'MessageAttributes' => [ 'TTR' => [ 'DataType' => 'Number', 'StringValue' => (string)$ttr, ], ], ];

Q A
Yii version 2.0.49
PHP version 8.1
Operating system ubuntu
AWS SDK 3.293.8
@rhertogh
Copy link
Contributor

@mahran419 This seems to be an issue with the yii2-queue package and I think it's the same issue fixed here: yiisoft/yii2-queue#502
Could you please try with the "dev-master" version ("yiisoft/yii2-queue": "dev-master" in your composer.json file).

@mahran419
Copy link
Author

@rhertogh Yes the same issue was fixed on version ("yiisoft/yii2-queue": "dev-master"
thank you @rhertogh

@samdark samdark closed this as completed Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants