{"id":15025619,"url":"https://github.com/ndthuan/aws-sqs-wrapper","last_synced_at":"2026-04-07T14:31:53.475Z","repository":{"id":57024459,"uuid":"156950551","full_name":"ndthuan/aws-sqs-wrapper","owner":"ndthuan","description":"PHP library for simplified SQS queue messages processing","archived":false,"fork":false,"pushed_at":"2018-11-26T12:39:49.000Z","size":498,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-29T14:14:53.890Z","etag":null,"topics":["aws","aws-sqs-wrapper","php","php-library","php7","php70","php71","php72","php73","sqs","sqs-client","sqs-consumer","sqs-interface","sqs-message","sqs-poller","sqs-queue","sqs-queues"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/ndthuan.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}},"created_at":"2018-11-10T05:26:02.000Z","updated_at":"2022-02-12T11:01:17.000Z","dependencies_parsed_at":"2022-08-23T14:21:03.177Z","dependency_job_id":null,"html_url":"https://github.com/ndthuan/aws-sqs-wrapper","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ndthuan/aws-sqs-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndthuan%2Faws-sqs-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndthuan%2Faws-sqs-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndthuan%2Faws-sqs-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndthuan%2Faws-sqs-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndthuan","download_url":"https://codeload.github.com/ndthuan/aws-sqs-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndthuan%2Faws-sqs-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31515394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["aws","aws-sqs-wrapper","php","php-library","php7","php70","php71","php72","php73","sqs","sqs-client","sqs-consumer","sqs-interface","sqs-message","sqs-poller","sqs-queue","sqs-queues"],"created_at":"2024-09-24T20:02:41.763Z","updated_at":"2026-04-07T14:31:53.457Z","avatar_url":"https://github.com/ndthuan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-sqs-wrapper\nPHP library for simplified SQS queue messages processing.\n\n![Build Status](https://travis-ci.org/ndthuan/aws-sqs-wrapper.svg?branch=master)\n\n## Introduction\n- This library converts send/receive/delete SQS messages results into objects. This enables you to utilize code autocompletion without memorizing common attribute names.\n- It removes your boilerplate code by introducing simplified send/receive/delete methods.\n- It decouples publishing and subscribing responsibilities so that your business logic is free from infrastructure awareness.\n\n## Installation\n\n```bash\ncomposer require ndthuan/aws-sqs-wrapper\n```\n\n## Usage\n\n### Sending a message\n```php\nuse Aws\\Sqs\\SqsClient;\nuse Ndthuan\\AwsSqsWrapper\\Publishing\\Publisher;\nuse Ndthuan\\AwsSqsWrapper\\Queue\\Connector;\n\n$queueUrl = ''; // get this from your own AWS SQS setup\n\n// creating a publisher\n$sqsClient = new SqsClient(...);\n$queueConnector = new Connector($sqsClient, $queueUrl);\n$publisher = new Publisher($queueConnector);\n\n// send a string message\n$publisher-\u003epublishString('My message body');\n// or send a json serializable object/array\n$myMessage = [\n    'my' =\u003e 'data',\n];\n$publisher-\u003epublishJsonSerializable($myMessage);\n```\n\n### Subscribing to a queue\n```php\nuse Aws\\Sqs\\SqsClient;\nuse Ndthuan\\AwsSqsWrapper\\Queue\\Connector;\nuse Ndthuan\\AwsSqsWrapper\\Queue\\ReceivedMessage;\nuse Ndthuan\\AwsSqsWrapper\\Queue\\ResultMetadata;\nuse Ndthuan\\AwsSqsWrapper\\Subscribing\\DelegatorSubscriber;\n\n// defining a message processor\nclass MyMessageProcessor implements MessageProcessorInterface\n{\n    /**\n     * @inheritdoc\n     */\n    public function processMessage(ReceivedMessage $message, ResultMetadata $resultMetadata)\n    {\n        // your processing logic\n    }\n}\n\n$queueUrl = ''; // get this from your own AWS SQS setup\n\n// creating a subscriber\n$sqsClient = new SqsClient(...);\n$queueConnector = new Connector($sqsClient, $queueUrl);\n$subscriber = new DelegatorSubscriber(new MyMessageProcessor(), $queueConnector);\n\n// run the subscriber\n$subscriber-\u003epullAndProcessMessages();\n```\n\n## Exception handling\n\nA message processor may throw exceptions or errors. Subscriber will react differently depending on exception type:\n\n- On `LogicException` and `ValidationFailureException`: the corresponding message is deleted from queue and the subscriber continues to process other messages.\n- On `FatalException`: the corresponding message is not deleted from queue but the subscriber stops processing and bubbles up the exception.\n- On other kinds of `\\Throwable`: the corresponding message is not deleted from queue and the subscriber continues to process other messages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndthuan%2Faws-sqs-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndthuan%2Faws-sqs-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndthuan%2Faws-sqs-wrapper/lists"}