asyncsqs wraps around SQS client from aws-sdk-go-v2 to provide an async buffered client which batches send message and delete message requests to optimise AWS costs.
Messages can be scheduled to be sent and deleted. Requests will be dispatched when
- either batch becomes full
- or waiting period exhausts (if configured)
- or the batch total body size becomes grater than or equal to 256 kb. (addition)
...whichever occurs earlier.
asyncsqs requires a Go version with modules support. If you're starting a new project, make sure to initialise a Go module:
$ mkdir ~/hellosqs
$ cd ~/hellosqs
$ go mod init github.com/my/hellosqsAnd then add asyncsqs as a dependency to your existing or new project:
$ go get github.com/ngoyal16/asyncsqsplease follow the demo code in the example folder