{"id":13669341,"url":"https://github.com/sshilko/backq","last_synced_at":"2025-08-25T23:35:45.926Z","repository":{"id":21036359,"uuid":"24332950","full_name":"sshilko/backq","owner":"sshilko","description":" Background tasks with workers \u0026 publishers via queues","archived":false,"fork":false,"pushed_at":"2025-06-24T12:58:20.000Z","size":316,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-25T10:42:55.963Z","etag":null,"topics":["apns","beanstalkd","closure","dynamodb","fcm","guzzle","php","redis","sns","sqs"],"latest_commit_sha":null,"homepage":"https://moar.sshilko.com/2019/09/19/Backq-v2/","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/sshilko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-22T14:57:10.000Z","updated_at":"2025-06-24T12:58:24.000Z","dependencies_parsed_at":"2023-01-13T21:16:35.623Z","dependency_job_id":null,"html_url":"https://github.com/sshilko/backq","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/sshilko/backq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshilko%2Fbackq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshilko%2Fbackq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshilko%2Fbackq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshilko%2Fbackq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshilko","download_url":"https://codeload.github.com/sshilko/backq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshilko%2Fbackq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272148915,"owners_count":24882027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"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":["apns","beanstalkd","closure","dynamodb","fcm","guzzle","php","redis","sns","sqs"],"created_at":"2024-08-02T08:01:10.462Z","updated_at":"2025-08-25T23:35:45.889Z","avatar_url":"https://github.com/sshilko.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"BackQ - Component\n=================\n\nBackground **queue processing** - publish tasks and process with workers, simplified.\n\n* Sending [APNS](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9) push notifications (Legacy API)\n* Sending [FCM](https://firebase.google.com/docs/cloud-messaging) push notifications to Android (GCM/FCM)\n* Sending [AWS SNS](https://aws.amazon.com/sns/) push notifications via AWS SNS arn's\n* Executing [Psr7\\Request](https://www.php-fig.org/psr/psr-7/) asynchronously via Guzzle\n* Executing **any** processes with [symfony/process](http://symfony.com/doc/current/components/process.html)\n* [Long delay scheduling](https://aws.amazon.com/blogs/aws/new-manage-dynamodb-items-using-time-to-live-ttl/) via DynamoSQS Adapter and Serialized worker, for reliable long-term scheduled jobs \n* Extendable - write your own worker and use existing adapters out of the box ...\n\n#### Installation\n\n```\n#composer self-update \u0026\u0026 composer clear-cache \u0026\u0026 composer diagnose\ncomposer require sshilko/backq:^3.0\n```\n\n#### Example with Redis adapter and `process` worker\n```\n#launch local redis\ndocker run -d --name=example-backq-redis --network=host redis\n\n#install library in any folder for testing\nmkdir /tmp/example \u0026\u0026 cd /tmp/example\ncomposer require sshilko/backq:^3.0\n\n#post job to queue (schedule)\ncd vendor/sshilko/backq/example/publishers/process \u0026\u0026 php redis.php \u0026\u0026 cd /tmp/example\n\n#[debug] connect\n#[debug] _connect\n#[debug] putTask\n#[debug] putTask is connected and ready to: write\n#[debug] putTask pushed task without delay xoOgPKcS9bIDVXSaLYH9aLB22gzzptRo\n#[debug] putTask return 'xoOgPKcS9bIDVXSaLYH9aLB22gzzptRo'\n#Published process message via redis adapter as ID=xoOgPKcS9bIDVXSaLYH9aLB22gzzptRo\n\n#fetch job from queue (work)\ncd vendor/sshilko/backq/example/workers/process \u0026\u0026 php redis.php \u0026\u0026 cd /tmp/example\n\n#[debug] connect\n#[debug] _connect\n#[debug] pickTask\n#[debug] pickTask blocking for 5 seconds until get a job\n#[debug] pickTask reserved a job nOgykJV81g969yw2wRMF94V9KiIeKN4P\n#[debug] afterWorkSuccess\n#[debug] afterWorkSuccess currently 1 reserved job(s)\n#[debug] afterWorkSuccess releasing completed nOgykJV81g969yw2wRMF94V9KiIeKN4P job\n#[debug] Disconnecting\n#[debug] Disconnecting, previously connected\n#[debug] Disconnecting, state detected\n#[debug] Disconnecting, state detected, queue is connected\n#[debug] Disconnecting, state 0 jobs reserved and not finalized\n#[debug] Disconnecting, state detected, disconnecting queue manager\n#[debug] Disconnecting, successful\n\n#verify job executed (example process worker does echo $( date +%s ) \u003e\u003e /tmp/test) \ncat /tmp/test\n\ndocker stop example-backq-redis\n```\n\n#### Supported queue servers\n\n* [Beanstalkd](https://github.com/kr/beanstalkd/blob/master/doc/protocol.txt)\n* [Redis](https://redis.io) \n* [NSQ](https://nsq.io) \n* [DynamoDB](https://aws.amazon.com/dynamodb/) [SQS](https://aws.amazon.com/sqs/) [Lambda](https://aws.amazon.com/lambda/) for DynamoSQS adapter\n\n#### Features\n\nWorkers compatibility with adapters\n\n| Adapter / Worker  |[FCM](https://firebase.google.com/docs/cloud-messaging)|[APNS](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9)|[Process](http://symfony.com/doc/current/components/process.html)|[Guzzle](https://www.php-fig.org/psr/psr-7/)|Serialized|[AWS SNS](https://aws.amazon.com/sns/)|[Closure](https://github.com/opis/closure)|\n|----|---|---|---|---|---|---|---|\n| [Beanstalkd](https://beanstalkd.github.io/)   | +  | +  | +  | +  | +  | +  | + |\n| [Redis](https://redis.io)        | +  | +  | +  | +  | ?  | +  | + |\n| [NSQ](https://nsq.io/)          | +  | +  | +  | +  | ?  | +  | ? |\n| [DynamoSQS](https://aws.amazon.com/)    | +  | +  | +  | +  | +  | ?  | + |\n\nAdapter implemented features\n\n| Adapter / Feature  | ping  | hasWorkers  | setWorkTimeout |\n|---|---|---|---|\n| [Beanstalkd](https://beanstalkd.github.io/)  | + | +  | + \n| [Redis](https://redis.io) | + | - | + \n| [NSQ](https://nsq.io/) | + |  - | * \n| [DynamoSQS](https://aws.amazon.com/) | - | - | + \n\nWorker available features\n\n- `setRestartThreshold` (limit max number of jobs cycles, then terminate)\n- `setIdleTimeout` (limit max idle time, then terminating)\n\nTLDR\n\n![Backq](https://github.com/sshilko/backq/raw/master/example/example.jpg \"Background tasks with workers and publishers via queues\")\n\nSee [/example](https://github.com/sshilko/backq/tree/master/example) folder for usage examples\n\n#### Old version 1 detailed review\n\n[Blog post about sending Apple push notifications](http://moar.sshilko.com/2014/09/09/APNS-Workers/) \n\n#### Licence\nMIT\n\nCopyright 2013-2022 Sergei Shilko\nCopyright 2016-2019 Carolina Alarcon\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshilko%2Fbackq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshilko%2Fbackq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshilko%2Fbackq/lists"}