{"id":17104967,"url":"https://github.com/gilbitron/sqsd","last_synced_at":"2026-03-18T02:32:04.588Z","repository":{"id":62510741,"uuid":"89577869","full_name":"gilbitron/sqsd","owner":"gilbitron","description":"A replica of the AWS Elastic Beanstalk worker SQS daemon (sqsd) in PHP","archived":false,"fork":false,"pushed_at":"2017-05-03T15:42:59.000Z","size":941,"stargazers_count":33,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-06T00:19:43.546Z","etag":null,"topics":["aws","daemon","elasticbeanstalk","php","sqs","sqsd"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/gilbitron/sqsd","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/gilbitron.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":"2017-04-27T09:02:12.000Z","updated_at":"2025-06-11T14:34:08.000Z","dependencies_parsed_at":"2022-11-02T13:02:02.561Z","dependency_job_id":null,"html_url":"https://github.com/gilbitron/sqsd","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gilbitron/sqsd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbitron%2Fsqsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbitron%2Fsqsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbitron%2Fsqsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbitron%2Fsqsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gilbitron","download_url":"https://codeload.github.com/gilbitron/sqsd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gilbitron%2Fsqsd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30642995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-18T01:41:58.583Z","status":"online","status_checked_at":"2026-03-18T02:00:07.824Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","daemon","elasticbeanstalk","php","sqs","sqsd"],"created_at":"2024-10-14T15:39:35.386Z","updated_at":"2026-03-18T02:32:04.564Z","avatar_url":"https://github.com/gilbitron.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQSD\n\nWhile testing a [Laravel](https://laravel.com) app running on [AWS Elastic Beanstalk](https://aws.amazon.com/elasticbeanstalk/) I came across the situation where I wanted to be able to test how my app would handle interacting with the worker tier SQS daemon (`sqsd`) on my local machine. As `sqsd` is not open source there is currently no official way of doing this.\n\nThis project ([inspired by others](https://github.com/proofme/sqsd)) is an attempt to replicate the functionality of `sqsd` in PHP for local testing purposes. Note that his library has **no dependency on Laravel** and can be used to test any kind of app.\n\n## Description\n\n![Sqsd architecture](https://cloud.githubusercontent.com/assets/203882/25480291/1719d8ca-2b40-11e7-8a2c-37831e59559c.png)\n\nThe Laravel queue worker operates by polling a queue for jobs and then runs them inline (as the queue worker is part of the application). As `sqsd` is completely separate from any application it works in a different way so that any application can be designed to work with it.\n\nSqsd works by polling a SQS queue for jobs and then `POST`'s them to an endpoint specified in your [Elastic Beanstalk worker environment settings](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html#using-features-managing-env-tiers-worker-settings) (default is `http://localhost/`). If a job fails for any reason, then the job is sent to what is called a [Dead Letter Queue](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html#worker-deadletter) for manual processing.\n\nAnother aspect of `sqsd` is that it can read a `cron.yaml` file in the root of your application which specifies [periodic tasks](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html#worker-periodictasks) that can be run on a schedule. Sqsd will send a job to the queue every time the schedule is triggered. These jobs will then be processed by `sqsd` like normal, but will be `POST`ed to the path specified in the `cron.yaml` with some extra headers.\n\n## Requirements\n\n* PHP \u003e= 5.5.0\n* Composer\n\n## Install \u0026 Usage\n\n1. Clone this repo\n1. Copy `.env.example` to `.env` and fill in the details (see below)\n1. Run `composer install`\n1. Run `php ./bin/sqsd.phar work`\n\nTo install as a composer dependency:\n\n1. Run `composer require gilbitron/sqsd`\n1. Run `php ./vendor/bin/sqsd.phar work`\n\nNote: If your're running `sqsd` as a composer dependency you will need to set your environment variables via the command line (see below for more info).\n\n## Configuration\n\nConfiguration is done by either setting environment variables before running `sqsd` (e.g. `export SQS_QUEUE_URL=https://sqs.us-east-1.amazonaws.com/123456789`) or specifying them in `.env`.\n\n| Env Variable | Description |\n| --- | --- |\n| `AWS_ACCESS_KEY_ID` * | AWS access key ID with SQS permissions |\n| `AWS_SECRET_ACCESS_KEY` * | AWS secret access key |\n| `SQS_QUEUE_URL` * | The URL of the SQS queue (e.g. `https://sqs.us-east-1.amazonaws.com/123456789`) |\n| `SQS_QUEUE_NAME` * | The name of the SQS queue |\n| `SQS_QUEUE_REGION` * | The region of the SQS queue (e.g. `us-east-1`) |\n| `SQS_MAX_MESSAGES` | The maximum number of messages that will be received from the SQS queue at a time (default and max is `10`) |\n| `SQS_WAIT_TIME` | The length of time in seconds that `sqsd` will wait while polling the SQS queue for messages |\n| `SQSD_WORKER_URL` | The URL the worker will `POST` to (default is `http://localhost`) |\n| `SQSD_WORKER_PATH` | The path that will be appended to the worker URL (default is `/`). This is the same as the **HTTP Path** setting in the [Elastic Beanstalk worker environment settings](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html#using-features-managing-env-tiers-worker-settings) |\n| `SQSD_CRON_PATH` | Absolute path to a `cron.yaml` which specifies periodic tasks |\n| `SQSD_SLEEP_SECONDS` | The time in seconds `sqsd` should sleep between checks (default is `1`) |\n| `SQSD_STORAGE_PATH` | Path to a writable storage dir (default is `/tmp/sqsd`) |\n\nEnvironment variables marked with a * are required for `sqsd` to work.\n\n## Building the Phar\n\nTo build Phar file first you need to [install Box](https://github.com/box-project/box2) then run:\n\n```\nbox build -v\n```\n\n## Laravel Tips\n\nIf you're looking for a package that will make Laravel work with `sqsd` I recommend [dusterio/laravel-aws-worker](https://github.com/dusterio/laravel-aws-worker).\n\nIf you are using this to test a Laravel app, instead of [configuring Supervisor](https://laravel.com/docs/5.4/queues#supervisor-configuration) to run the `aritsan queue:work` command, configure Supervisor to run the `sqsd work` command.\n\n## Contribute\n\nSo you want to help out? That's awesome. Here is how you can do it:\n\n* [Report a bug](https://github.com/gilbitron/sqsd/issues)\n* [Ask for a feature](https://github.com/gilbitron/sqsd/issues)\n* [Submit a pull request](https://github.com/gilbitron/sqsd/pulls)\n\nIf you are submitting a pull request please adhere to the existing coding standards used throughout the code\nand only submit **1 feature/fix per pull request**. Pull requests containing multiple changes will be rejected.\n\n## Credits\n\nSqsd was created by [Gilbert Pellegrom](http://gilbert.pellegrom.me) from\n[Dev7studios](http://dev7studios.co). Released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilbitron%2Fsqsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgilbitron%2Fsqsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgilbitron%2Fsqsd/lists"}