grafana / k6-jslib-aws

Javascript Library allowing to interact with AWS resources from k6 scripts
Apache License 2.0
18 stars 28 forks source link

Introduce for SQS.SendMessageBatch #101

Closed lolleko closed 2 days ago

lolleko commented 2 months ago
CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

oleiade commented 1 month ago

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?

lolleko commented 1 month ago

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.

oleiade commented 1 month ago

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 🎉