k6-jslib-aws
k6-jslib-aws copied to clipboard
Introduce for SQS.SendMessageBatch
-
Introduces SQS.SendMessageBatch function
-
Refactors SQS service to use json instead of xml requests.
-
Had to bump local stack image because of https://github.com/localstack/localstack/issues/9610
-
Potential breaking change because i renamed Message to MessageResponse, can also revert
Hi @lolleko 👋🏻
Apologies for the delay. Thanks a lot for your contribution 🙇🏻
At first glance, this looks good. However, could you please update the PR based on the latest state of main
? We've made some changes recently and released a couple of minor releases. Currently, the tests of this PR fail, but I have a hunch this might be the cause.
Furthermore, I'm not an SQS user myself. Is there an advantage to using JSON over XML besides the format itself? Is XML possibly deprecated or considered a legacy format?
Hey @oleiade,
no worries, and also sorry from my side for not picking this up again sooner.
Updated to latest main :)
Furthermore, I'm not an SQS user myself. Is there an advantage to using JSON over XML besides the format itself? Is XML possibly deprecated or considered a legacy format?
TBH for me it was mainly a personal preference, since XML is complex to work with especially in JS/TS. But I also found this in the AWS docs:
Amazon SQS uses AWS JSON protocol as the transport mechanism for all Amazon SQS APIs on the specified AWS SDK versions. AWS JSON protocol provides a higher throughput, lower latency, and faster application-to-application communication. AWS JSON protocol is more efficient in serialization/deserialization of requests and responses when compared to AWS query protocol. If you still prefer to use the AWS query protocol with SQS APIs, see What languages are supported for AWS JSON protocol used in Amazon SQS APIs? for the AWS SDK versions that support Amazon SQS AWS query protocol.
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-working-with-apis.html
So not deprecated, but discouraged.
I see, thanks a lot @lolleko for the explanation, that makes sense 🙇🏻
I'll go ahead and make a more thorough review then, and let's get this through the door 🎉