-
Notifications
You must be signed in to change notification settings - Fork 15
SQS sendMessageBatch is missing Failed
array in the response (v2.1500)
#657
Comments
To reproduce:
produces:
But the clients
in which |
Same error using sqs-producer:1.6.3 |
This was probably introduced in 2.1491.0.
As suggested in aws/aws-sdk-js#4523, we downgraded to 2.1490, which resolved this problem. |
Having same issue here. with sqs-producer:2.2.0. |
Somewhat incorrectly redirected AWS support to aws/aws-sdk-js#4523 where there was an answer at aws/aws-sdk-js#4523 (comment) . I am raising the |
Hello everyone on the thread, Recently the SQS service moved from XML wire protocol to a more modern JSON RPC protocol. Since the SQS service changed the protocol, the SDK's SQS Client now sends the requests in JSON format: I ran Just to make sure its not SDK specific, I tested it with the Go SDK which has a much more robust wire logger and got the same result: package main
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sqs"
)
func main() {
sess := session.Must(session.NewSession(&aws.Config{
Region: aws.String("us-east-1"),
LogLevel: aws.LogLevel(aws.LogDebugWithHTTPBody),
}))
client := sqs.New(sess)
_, err := client.SendMessageBatch(&sqs.SendMessageBatchInput{
QueueUrl: aws.String("https://sqs.us-east-1.amazonaws.com/REDACTED/test-queue"),
Entries: []*sqs.SendMessageBatchRequestEntry{
{
Id: aws.String("123123"),
MessageBody: aws.String("{ foo: 'bar' }"),
},
},
})
if err != nil {
panic(err)
}
} And the raw response does not contain the
My assumption is that SQS service supports both the new JSON rpc, and the XML(sqs Query) protocol for backwards compatibility reasons (thats why older versions still work and do not break after the move). However their model only specifies JSON rpc as the only wire protocol. So the conclusion here is that SQS is not sending the same response in the JSON rpc protocol as the one it does through the XML based protocol. This is not something that the SDK can change as this data comes from the server itself. Since @Noezor has already raised an internal ticket with AWS, I will re-route it to SQS for further investigation. Thanks, |
@RanVaknin thank youf or the follow up. What's interesting in this case, this has been working fine on the updated versions of the SDK, but stopped working around 23rd 6pm UTC (for us). Others have made the same observation, see : ssut/nestjs-sqs#72 + the TS types / AWS docs also currently contain 'Failed'. @Noezor thanks for raising a support case. Can you keep us posted if you get a response or post the Case ID so that we can refer to it? |
+1 on the issue starting to appear at this time for us too. This created quite a lot of headaches to find the root cause. CASE 14379988591 is where we filled it. I'll let support know that the issue has been rerouted to the SQS team, will also keep you posted if I get an answer quicker on support than here. |
Hi there, Thank you all for your patience. After some more investigation, we have found out that the behavior of adding I have created a fix for v2 to continue (mis)behaving the way it did before the migration to JSON. But just a heads up, this behavior is not going to be the same in v3. In v3 we rely on the service to send back data, and the SDK does not model data that is not returned. Thanks again for your cooperation. |
Thanks a lot Ran! Just tested and it works. Super speedy fix considering you had to ping an external team. By the way, I used latest version ( |
Hi @Noezor , Great to hear that this now is working. I ended up patching it locally, thats why it was fast 😄. Im going to close this issue. If something else comes up please open a separate issue in the v2 repo. Thanks again, |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
SendMessageBatch does not contain
Failed: []
anymore in case of successful sends:Gives us:
Expected Behavior
According to the SendMessageBatch docs and the AWS SDK documentation,
Failed
is a required property:SendMessageBatch API Docs
Example:
Current Behavior
Failed
is missing from the response object (in eu-central-1 as of 7am UTC)Reproduction Steps
Perform
sendMessageBatch
using theaws-js-sdk
ineu-central-1
.Possible Solution
Apparently this is handled at the SDK level now in for instance the Ruby SDK:
aws/aws-sdk-ruby#2957
Additional Information/Context
No response
SDK version used
2.1500
Environment details (OS name and version, etc.)
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: