{"id":14974717,"url":"https://github.com/mxl/laravel-queue-rate-limit","last_synced_at":"2025-10-09T23:34:31.427Z","repository":{"id":35045059,"uuid":"200192954","full_name":"mxl/laravel-queue-rate-limit","owner":"mxl","description":"Simple Laravel queue rate limiting","archived":false,"fork":false,"pushed_at":"2024-09-21T06:50:18.000Z","size":23,"stargazers_count":94,"open_issues_count":9,"forks_count":22,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-06T18:51:01.902Z","etag":null,"topics":["laravel","laravel-framework","php","php-library","queue","rate-limiting"],"latest_commit_sha":null,"homepage":null,"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/mxl.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":"2019-08-02T08:03:58.000Z","updated_at":"2025-07-21T06:04:06.000Z","dependencies_parsed_at":"2024-09-23T16:01:35.414Z","dependency_job_id":null,"html_url":"https://github.com/mxl/laravel-queue-rate-limit","commit_stats":{"total_commits":23,"total_committers":6,"mean_commits":"3.8333333333333335","dds":0.5217391304347826,"last_synced_commit":"f5419853346d0c46f544bdcaebbf8c41ad9ff751"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/mxl/laravel-queue-rate-limit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxl%2Flaravel-queue-rate-limit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxl%2Flaravel-queue-rate-limit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxl%2Flaravel-queue-rate-limit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxl%2Flaravel-queue-rate-limit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxl","download_url":"https://codeload.github.com/mxl/laravel-queue-rate-limit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxl%2Flaravel-queue-rate-limit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002310,"owners_count":26083340,"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-10-09T02:00:07.460Z","response_time":59,"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":["laravel","laravel-framework","php","php-library","queue","rate-limiting"],"created_at":"2024-09-24T13:50:58.906Z","updated_at":"2025-10-09T23:34:31.410Z","avatar_url":"https://github.com/mxl.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-queue-rate-limit\n[![Current version](https://img.shields.io/packagist/v/mxl/laravel-queue-rate-limit.svg?logo=composer)](https://packagist.org/packages/mxl/laravel-queue-rate-limit)\n[![Monthly Downloads](https://img.shields.io/packagist/dm/mxl/laravel-queue-rate-limit.svg)](https://packagist.org/packages/mxl/laravel-queue-rate-limit/stats)\n[![Total Downloads](https://img.shields.io/packagist/dt/mxl/laravel-queue-rate-limit.svg)](https://packagist.org/packages/mxl/laravel-queue-rate-limit/stats)\n[![Build Status](https://travis-ci.org/mxl/laravel-queue-rate-limit.svg?branch=master)](https://travis-ci.org/mxl/laravel-queue-rate-limit)\n\nSimple Laravel queue rate limiting\n\n## Installation\n\n3.* versions are compatible only with Laravel 7+.\n\n```bash\n$ composer require mxl/laravel-queue-rate-limit\n```\n\nFor Laravel 6 use 2.* versions:\n\n```bash\n$ composer require mxl/laravel-queue-rate-limit \"^2.0\"\n```\n\nFor Laravel 5 use 1.* versions:\n\n```bash\n$ composer require mxl/laravel-queue-rate-limit \"^1.0\"\n```\n\nLaravel 5.5+ will use the [auto-discovery](https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518) feature to add `MichaelLedin\\LaravelQueueRateLimit\\QueueServiceProvider::class` to providers.\n\nThis package is not compatible with older Laravel versions.\n\nAdd rate limits to `config/queue.php`:\n\n```php\n'rateLimits' =\u003e [\n     'mail' =\u003e [ // queue name\n        'allows' =\u003e 1, // 1 job\n        'every' =\u003e 5 // per 5 seconds\n     ]\n]\n```\n\n## Usage\n\nMake sure that you don't use `sync` connection when queueing jobs. See `default` property in `config/queue.php`.\n\nRun queue worker:\n\n```bash\n$ php artisan queue:work --queue default,mail\n```\n\nThen push several jobs to `default` and `mail` queues:\n\n```php\nMail::queue(..., 'mail');\nMail::queue(..., 'mail');\nMail::queue(..., 'mail');\nMail::queue(..., 'default');\nMail::queue(..., 'default');\n```\n\nYou'll see that only `mail` queue jobs will be rate limited while `default` queue jobs will run normally.\n\n## Disable logging\n\nExtend `QueueServiceProvider`:\n\n```php\n\u003c?php\n\nnamespace App\\Providers;\n\nclass QueueServiceProvider extends \\MichaelLedin\\LaravelQueueRateLimit\\QueueServiceProvider\n{\n    protected function registerLogger()\n    {\n        $this-\u003eapp-\u003esingleton('queue.logger', function () {\n            return null;\n        });\n    }\n}\n```\n\nAdd it to `providers` array in `config/app.php`:\n\n```php\n\u003c?php\n\nreturn [\n    // ...\n    'providers' =\u003e [\n        // Laravel Framework Service Providers\n        // ...\n        // Application Service Providers\n        // ...\n        App\\Providers\\QueueServiceProvider::class,\n        // ...\n    ]\n];\n```\n\n## Maintainers\n\n- [@mxl](https://github.com/mxl)\n\n## Other useful Laravel packages from the author\n\n- [mxl/laravel-api-key](https://github.com/mxl/laravel-api-key) - API Key Authorization for Laravel with replay attack prevention;\n- [mxl/laravel-job](https://github.com/mxl/laravel-job) - dispatch a job from command line and more;\n\n## License\n\nSee the [LICENSE](https://github.com/mxl/laravel-queue-rate-limit/blob/master/LICENSE) file for details.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxl%2Flaravel-queue-rate-limit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxl%2Flaravel-queue-rate-limit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxl%2Flaravel-queue-rate-limit/lists"}