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 Bulks issue #100

Closed
ibrahimMH13 opened this issue Oct 6, 2023 · 1 comment
Closed

SQS Bulks issue #100

ibrahimMH13 opened this issue Oct 6, 2023 · 1 comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@ibrahimMH13
Copy link

Describe the bug

I've tried pushing bulk payloads using sendMessageBatch and it pushed after that throws an exception

InvalidArgumentException {#17
  #message: """
    Found 1 error while validating the input provided for the SendMessageBatch operation:
    [Entries][0] must be an associative array. Found array(6)
    """
  #code: 0
  #file: "[/var/www/html/vendor/aws/aws-sdk-php/src/Api/Validator.php](https://my-dev-local.insead.edu/_profiler/open?file=vendor/aws/aws-sdk-php/src/Api/Validator.php&line=65#line65)"
  #line: 65 

I've seen my message into the queue via my console web so I don't know why its throw this exception and its works fine with same payload when I've used sendMessage

its strange behavior of it

Expected Behavior

pushing without expcetions

Current Behavior

sendMessageBatch throws an exception after push messages

Reproduction Steps

public function sendMessages(array $payload)
{
    $result = $this->client->sendMessageBatch($payload);
    $failed = $result->get('Failed');
    if (!empty($failed)) {
        foreach ($failed as $failure) {
            echo "Failed sending message: {$failure['Id']}, Code: {$failure['Code']}, Message: {$failure['Message']}\n";
        }
    }
    if (!empty($result->get('Successful'))) {
        foreach ($result->get('Successful') as $value) {
            echo "Successful sending message: {$value['Id']}\n<br/>";
        }
    }
}

Possible Solution

No response

Additional Information/Context

No response

SDK version used

2.6.1

Environment details (OS name and version, etc.)

ubuntu 20

@ibrahimMH13 ibrahimMH13 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 6, 2023
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant