{"id":18376885,"url":"https://github.com/bbc/sqs-producer","last_synced_at":"2026-05-21T03:06:39.353Z","repository":{"id":24667847,"uuid":"28078276","full_name":"bbc/sqs-producer","owner":"bbc","description":"Simple scaffolding for applications that produce SQS messages","archived":false,"fork":false,"pushed_at":"2026-05-16T08:29:47.000Z","size":1558,"stargazers_count":219,"open_issues_count":6,"forks_count":52,"subscribers_count":31,"default_branch":"main","last_synced_at":"2026-05-16T10:37:12.073Z","etag":null,"topics":["aws-sqs","backend","ignorearchive","message-queue","nodejs","queue-producer","serverless","sqs"],"latest_commit_sha":null,"homepage":"https://bbc.github.io/sqs-producer/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-12-16T08:47:11.000Z","updated_at":"2026-05-16T08:29:49.000Z","dependencies_parsed_at":"2026-01-19T02:03:26.086Z","dependency_job_id":null,"html_url":"https://github.com/bbc/sqs-producer","commit_stats":{"total_commits":199,"total_committers":31,"mean_commits":6.419354838709677,"dds":0.8341708542713568,"last_synced_commit":"edd4796d2624afdc52988f31f79444bd03dd85e8"},"previous_names":[],"tags_count":89,"template":false,"template_full_name":null,"purl":"pkg:github/bbc/sqs-producer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fsqs-producer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fsqs-producer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fsqs-producer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fsqs-producer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbc","download_url":"https://codeload.github.com/bbc/sqs-producer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fsqs-producer/sbom","scorecard":{"id":19134,"data":{"date":"2022-08-15","repo":{"name":"github.com/bbc/sqs-producer","commit":"782b1744c374a51afbcf8d42ac1ea6dabcf2e175"},"scorecard":{"version":"v4.5.0-17-g7772984","commit":"777298477c07c262a4ec7e95ceee839b7b3b75ae"},"score":6,"checks":[{"name":"Code-Review","score":3,"reason":"GitHub code reviews found for 11 commits out of the last 30 -- score normalized to 3","details":["Warn: no reviews found for commit: ad36540bbf973c3938995eafe897ea97dbc2b192","Warn: no reviews found for commit: df353154276499a82c043df9204b9dbc2b638f4b","Warn: no reviews found for commit: 33f627e63e8d8b777152520be5eee94a3328d48c","Warn: no reviews found for commit: 44707d448f487d9bcf415c87391852b95c518dc6","Warn: no reviews found for commit: 192abd63b8af07c5b0f06575b91870e9129093af","Warn: no reviews found for commit: 6c02383ec3c9c5e53a39cac7c433aca096f94460","Warn: no reviews found for commit: 181dbacf51084c9357f0d0f7f678e55ea88d0b38","Warn: no reviews found for commit: a24ff4117d1a28099c8f5515ae7c0815ceb3a69a","Warn: no reviews found for commit: 1d8b5e8b072fbfaf951bc7c1261f3b1db5156dc7","Warn: no reviews found for commit: e8620d46ad28bd798cfbec574eb80bad60ffbdc2","Warn: no reviews found for commit: de7d7ddded2114adf07d1f513e5b0d81ccfa4954","Warn: no reviews found for commit: a8acbd5be330fec49213ec0dff742a639e0d47c6","Warn: no reviews found for commit: 738908e52fe6d9421c4e9bb42c3200ccf005ae43","Warn: no reviews found for commit: aadef8d34e54637ba28c2239690e2e8bf9e004e7","Warn: no reviews found for commit: 28fcc5adb4309010755385e587cd71a55f72dfa8","Warn: no reviews found for commit: 08fb072ac9335611c3db790a570a76a3c96157f5","Warn: no reviews found for commit: 6d724c9adcd9287325c4e41647015bf85434f2c2","Warn: no reviews found for commit: cb92988b124d3a04830fa03823229ef33cbb509d","Warn: no reviews found for commit: 42672c121175db5297b28300f07bb38e1997addf"],"documentation":{"short":"Determines if the project requires code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) out of 30 and 0 issue activity out of 28 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/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no badge detected","details":null,"documentation":{"short":"Determines if the project has a CII Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"no vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#vulnerabilities"}},{"name":"Token-Permissions","score":10,"reason":"tokens are read-only in GitHub workflows","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: : LICENSE:1"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"no published package detected","details":["Warn: no GitHub 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/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#packaging"}},{"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/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info: GitHub-owned GitHubActions are pinned","Info: Third-party GitHubActions are pinned","Info: Dockerfile dependencies are pinned","Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles","Info: no insecure (not pinned by hash) dependency downloads found in shell scripts"],"documentation":{"short":"Determines if the project has declared and pinned its dependencies.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#pinned-dependencies"}},{"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/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":null,"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#security-policy"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: Dependabot detected"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#dependency-update-tool"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":null,"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":["Warn: no GitHub releases found"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/777298477c07c262a4ec7e95ceee839b7b3b75ae/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-14T16:25:03.458Z","repository_id":24667847,"created_at":"2025-08-14T16:25:03.462Z","updated_at":"2025-08-14T16:25:03.462Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33286740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T02:57:32.698Z","status":"ssl_error","status_checked_at":"2026-05-21T02:57:31.990Z","response_time":62,"last_error":"SSL_read: 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":["aws-sqs","backend","ignorearchive","message-queue","nodejs","queue-producer","serverless","sqs"],"created_at":"2024-11-06T00:25:16.005Z","updated_at":"2026-05-21T03:06:39.328Z","avatar_url":"https://github.com/bbc.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# sqs-producer\n\n[![NPM downloads](https://img.shields.io/npm/dm/sqs-producer.svg?style=flat)](https://npmjs.org/package/sqs-producer)\n[![Build Status](https://github.com/bbc/sqs-producer/actions/workflows/test.yml/badge.svg)](https://github.com/bbc/sqs-producer/actions/workflows/test.yml)\n\nEnqueues messages onto a given SQS queue.\n\n## Installation\n\nTo install this package, enter the following command into your terminal (or the variant of whatever package manager you are using):\n\n```\nnpm install sqs-producer\n```\n\n### Node version\n\nWe will only support Node versions that are actively or security supported by the Node team. You can find the list of versions that are actively supported [here](https://nodejs.org/en/about/releases/).\n\n## Documentation\n\nVisit [https://bbc.github.io/sqs-producer/](https://bbc.github.io/sqs-producer/) for the full API documentation.\n\n## Usage\n\n```js\nimport { Producer } from \"sqs-producer\";\nimport { SQSClient } from \"@aws-sdk/client-sqs\";\n\n// create simple producer\nconst producer = Producer.create({\n  queueUrl: \"https://sqs.eu-west-1.amazonaws.com/account-id/queue-name\",\n  region: \"eu-west-1\",\n});\n\n// send messages to the queue\nawait producer.send([\"msg1\", \"msg2\"]);\n\n// get the current size of the queue\nconst size = await producer.queueSize();\nconsole.log(`There are ${size} messages on the queue.`);\n\n// send a message to the queue with a specific ID (by default the body is used as the ID)\nawait producer.send([\n  {\n    id: \"id1\",\n    body: \"Hello world\",\n  },\n]);\n\n// send a message to the queue with\n// - delaySeconds (must be an number contained within 0 and 900)\n// - messageAttributes\nawait producer.send([\n  {\n    id: \"id1\",\n    body: \"Hello world with two string attributes: attr1 and attr2\",\n    messageAttributes: {\n      attr1: { DataType: \"String\", StringValue: \"stringValue\" },\n      attr2: { DataType: \"Binary\", BinaryValue: new Buffer(\"binaryValue\") },\n    },\n  },\n  {\n    id: \"id2\",\n    body: \"Hello world delayed by 5 seconds\",\n    delaySeconds: 5,\n  },\n]);\n\n// send a message to a FIFO queue\n//\n// note that AWS FIFO queues require two additional params:\n// - groupId (string)\n// - deduplicationId (string)\n//\n// deduplicationId can be excluded if content-based deduplication is enabled\n//\n// https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html\nawait producer.send({\n  id: \"testId\",\n  body: \"Hello world from our FIFO queue!\",\n  groupId: \"group1234\",\n  deduplicationId: \"abcdef123456\", // typically a hash of the message body\n});\n\n// send messages to a standard queue with groupId for fair queue behavior\n//\n// Fair queues automatically mitigate noisy neighbor impact in multi-tenant queues\n// by using groupId to identify tenants and ensure fair resource allocation\n//\n// https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-fair-queues.html\nawait producer.send([\n  {\n    id: \"msg1\",\n    body: \"Message from tenant A\",\n    groupId: \"tenant-a\",\n  },\n  {\n    id: \"msg2\",\n    body: \"Message from tenant B\",\n    groupId: \"tenant-b\",\n  },\n]);\n```\n\n### Credentials\n\nBy default the producer will look for AWS credentials in the places [specified by the AWS SDK](https://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Setting_AWS_Credentials). The simplest option is to export your credentials as environment variables:\n\n```bash\nexport AWS_SECRET_ACCESS_KEY=...\nexport AWS_ACCESS_KEY_ID=...\n```\n\nIf you need to specify your credentials manually, you can use a pre-configured instance of the [SQS Client](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sqs/classes/sqsclient.html) client.\n\n```js\nimport { Producer } from \"sqs-producer\";\nimport { SQSClient } from \"@aws-sdk/client-sqs\";\n\n// create simple producer\nconst producer = Producer.create({\n  queueUrl: \"https://sqs.eu-west-1.amazonaws.com/account-id/queue-name\",\n  region: \"eu-west-1\",\n  sqs: new SQSClient({\n    region: \"my-region\",\n    credentials: {\n      accessKeyId: \"yourAccessKey\",\n      secretAccessKey: \"yourSecret\",\n    },\n  }),\n});\n\n// send messages to the queue\nawait producer.send([\"msg1\", \"msg2\"]);\n```\n\n## Development\n\n### Test\n\n```bash\nnpm test\n```\n\n### Coverage\n\nFor coverage report, run the command:\n\n```bash\nnpm run coverage\n```\n\n### Lint\n\nTo check for problems using ESLint\n\n```bash\nnpm run lint\n```\n\n## Contributing\n\nWe welcome and appreciate contributions for anyone who would like to take the time to fix a bug or implement a new feature.\n\nBut before you get started, [please read the contributing guidelines](https://github.com/bbc/sqs-producer/blob/main/.github/CONTRIBUTING.md) and [code of conduct](https://github.com/bbc/sqs-producer/blob/main/.github/CODE_OF_CONDUCT.md).\n\n## License\n\nSQS Producer is distributed under the Apache License, Version 2.0, see [LICENSE](./LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Fsqs-producer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbc%2Fsqs-producer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Fsqs-producer/lists"}