{"id":36494781,"url":"https://github.com/prashanthpai/asyncsqs","last_synced_at":"2026-01-12T01:59:58.889Z","repository":{"id":57628301,"uuid":"404706325","full_name":"prashanthpai/asyncsqs","owner":"prashanthpai","description":"asyncsqs wraps around SQS client from aws-sdk-go-v2 to provide an async buffered client to optimise AWS costs.","archived":false,"fork":false,"pushed_at":"2024-12-23T15:58:14.000Z","size":43,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-23T16:38:46.587Z","etag":null,"topics":["async","aws-sdk-go","aws-sdk-go-v2","batch","buffered","queue","sqs","sqs-client","sqs-queue"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prashanthpai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-09T12:04:47.000Z","updated_at":"2024-12-23T15:58:17.000Z","dependencies_parsed_at":"2024-12-23T16:31:24.700Z","dependency_job_id":"9999a403-60aa-48a2-8b7b-93923b7adfaa","html_url":"https://github.com/prashanthpai/asyncsqs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prashanthpai/asyncsqs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanthpai%2Fasyncsqs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanthpai%2Fasyncsqs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanthpai%2Fasyncsqs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanthpai%2Fasyncsqs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prashanthpai","download_url":"https://codeload.github.com/prashanthpai/asyncsqs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanthpai%2Fasyncsqs/sbom","scorecard":{"id":743867,"data":{"date":"2025-08-11","repo":{"name":"github.com/prashanthpai/asyncsqs","commit":"80a6146b9b8b9acb7df3eef4b4374edd7b1bdc1e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/prashanthpai/asyncsqs/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/prashanthpai/asyncsqs/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/prashanthpai/asyncsqs/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/prashanthpai/asyncsqs/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/prashanthpai/asyncsqs/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/prashanthpai/asyncsqs/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/prashanthpai/asyncsqs/test.yml/master?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T18:12:54.568Z","repository_id":57628301,"created_at":"2025-08-22T18:12:54.568Z","updated_at":"2025-08-22T18:12:54.568Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","aws-sdk-go","aws-sdk-go-v2","batch","buffered","queue","sqs","sqs-client","sqs-queue"],"created_at":"2026-01-12T01:59:57.469Z","updated_at":"2026-01-12T01:59:58.884Z","avatar_url":"https://github.com/prashanthpai.png","language":"Go","readme":"# asyncsqs\n\n[![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-blue?logo=go)](https://pkg.go.dev/github.com/prashanthpai/asyncsqs?tab=doc)\n[![Build, Unit Tests, Linters Status](https://github.com/prashanthpai/asyncsqs/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/prashanthpai/asyncsqs/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/prashanthpai/asyncsqs/branch/master/graph/badge.svg)](https://codecov.io/gh/prashanthpai/asyncsqs)\n[![Go Report Card](https://goreportcard.com/badge/github.com/prashanthpai/asyncsqs?clear_cache=2)](https://goreportcard.com/report/github.com/prashanthpai/asyncsqs)\n[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n\nasyncsqs wraps around [SQS client](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/sqs#Client)\nfrom [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) to provide an async\nbuffered client which batches send message and delete message requests to\n**optimise AWS costs**.\n\nMessages can be scheduled to be sent and deleted. Requests will be dispatched\nwhen\n\n* either batch becomes full\n* or waiting period exhausts (if configured)\n\n...**whichever occurs earlier**.\n\n## Getting started\n\n###### Add dependency\n\nasyncsqs requires a Go version with [modules](https://github.com/golang/go/wiki/Modules)\nsupport. If you're starting a new project, make sure to initialise a Go module:\n\n```sh\n$ mkdir ~/hellosqs\n$ cd ~/hellosqs\n$ go mod init github.com/my/hellosqs\n```\n\nAnd then add asyncsqs as a dependency to your existing or new project:\n\n```sh\n$ go get github.com/prashanthpai/asyncsqs\n```\n\n###### Write Code\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"strconv\"\n\n\t\"github.com/prashanthpai/asyncsqs\"\n\n\t\"github.com/aws/aws-sdk-go-v2/aws\"\n\t\"github.com/aws/aws-sdk-go-v2/config\"\n\t\"github.com/aws/aws-sdk-go-v2/service/sqs\"\n\t\"github.com/aws/aws-sdk-go-v2/service/sqs/types\"\n)\n\nfunc main() {\n\t// Create a SQS client with appropriate credentials/IAM role, region etc.\n\tawsCfg, err := config.LoadDefaultConfig(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"config.LoadDefaultConfig() failed: %v\", err)\n\t}\n\tsqsClient := sqs.NewFromConfig(awsCfg)\n\n\t// Create a asyncsqs buffered client; you'd have one per SQS queue\n\tclient, err := asyncsqs.NewBufferedClient(asyncsqs.Config{\n\t\tSQSClient:          sqsClient,\n\t\tQueueURL:           \"https://sqs.us-east-1.amazonaws.com/xxxxxxxxxxxx/qqqqqqqqqqqq\",\n\t\tOnSendMessageBatch: sendResponseHandler, // register callback function (recommended)\n\t})\n\tif err != nil {\n\t\tlog.Fatalf(\"asyncsqs.NewBufferedClient() failed: %v\", err)\n\t}\n\t// important! Stop() ensures that requests in memory are gracefully\n\t// flushed/dispatched and resources like goroutines are cleaned-up\n\tdefer client.Stop()\n\n\tfor i := 0; i \u003c 100; i++ {\n\t\t_ = client.SendMessageAsync(types.SendMessageBatchRequestEntry{\n\t\t\tId:          aws.String(strconv.Itoa(i)),\n\t\t\tMessageBody: aws.String(\"hello world\"),\n\t\t})\n\t}\n}\n\nfunc sendResponseHandler(output *sqs.SendMessageBatchOutput, err error) {\n\tif err != nil {\n\t\tlog.Printf(\"send returned error: %v\", err)\n\t}\n\tfor _, s := range output.Successful {\n\t\tlog.Printf(\"message send successful: msg id = %s\", *s.Id)\n\t}\n\tfor _, f := range output.Failed {\n\t\tlog.Printf(\"message send failed: msg id = %s\", *f.Id)\n\t}\n}\n```\n\n### Limitation\n\nWhile asyncsqs ensures batch size doesn't exceed SQS's limit of 10 messages,\nit does not validate size of the payload **yet**. SQS places following limits\non batch request payload:\n\n    The maximum allowed individual message size and the maximum total payload size\n    (the sum of the individual lengths of all of the batched messages) are both\n    256 KB (262,144 bytes).\n\nThis translates to an average payload limit of around 25KB per individual message.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashanthpai%2Fasyncsqs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprashanthpai%2Fasyncsqs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashanthpai%2Fasyncsqs/lists"}