Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Pubsub Queue

Laravel Pubsub Queue Laravel Package

kainxspirits/laravel-pubsub-queue

Laravel queue driver for Google Cloud Pub/Sub. Install via Composer, add a pubsub connection in config/queue.php, and configure project ID, queue, retries, and timeouts. Disable topic/subscription creation to avoid admin operation limits.

View on GitHub
Deep Wiki
Context7

Laravel PubSub Queue is a Laravel queue driver that lets you run your queues on Google Cloud Pub/Sub instead of a traditional backend. It plugs into the standard queue API, so jobs, workers, and failed-job handling work as usual while messages are delivered through Google's managed messaging service.

Configuration is done with a pubsub connection in config/queue.php, supporting options like project_id, queue_prefix, retries, request_timeout, and automatic topic and subscription creation.

  • Drop-in Laravel queue driver backed by Google Cloud Pub/Sub
  • Accepts any Pub/Sub client configuration option in snake_case
  • Optional automatic topic and subscription creation
  • Works with the familiar Laravel queue and worker commands
Frequently asked questions about Laravel Pubsub Queue
What is kainxspirits/laravel-pubsub-queue used for?
It is a Laravel queue driver for Google Cloud Pub/Sub. You add a pubsub connection in config/queue.php and dispatch jobs through Pub/Sub instead of a database or Redis queue. It fits event-driven and fan-out workloads supported by Pub/Sub.
How do I install and configure the Laravel PubSub queue driver?
Install it with composer require kainxspirits/laravel-pubsub-queue. If package discovery is disabled, register Kainxspirits\PubSubQueue\PubSubQueueServiceProvider in config/app.php. Add a pubsub connection to config/queue.php with driver pubsub, project_id, queue, retries, request_timeout, subscriber, create_topics, and create_subscriptions as needed. Use snake_case keys matching Google Cloud PubSub client options.
Which Laravel versions does laravel-pubsub-queue support?
Version 0.11.0 extends support to Laravel 13, following earlier support for Laravel 10, 11, and 12. The package's illuminate/* constraints admit Laravel 13 according to the release notes. Verify with composer why-not before making a roadmap commitment. Support for older majors may be dropped in a future release, so pin versions and test upgrades.
How do I run the package tests locally?
Run vendor/bin/phpunit after installing dependencies. CI runs tests on PHP 8.4 and 8.5 per the 0.11.0 notes. Green CI does not replace staging validation of your real job payloads, dispatch, queue:work, failure, and retry paths.
What configuration options are available for the pubsub queue connection?
The connection accepts driver, queue, queue_prefix, project_id, retries, request_timeout, subscriber, create_topics, and create_subscriptions. You can use any configuration values from the original Pub/Sub client as long as keys are snake_case. Set create_topics and create_subscriptions to false to avoid Pub/Sub administrator operations limits. Check the Google Cloud PubSub client docs for constructor options.
How do retries and timeouts work with this Pub/Sub queue driver?
Configure retries and request_timeout in the pubsub connection array. Retries controls job attempts, while request_timeout sets the Pub/Sub client request timeout in seconds. Validate failure and retry behavior in staging because Laravel queue internals can differ across major versions.
Should I enable create_topics and create_subscriptions in production?
The README recommends changing both flags to false to avoid administrator operations limits. Enable them only when bootstrapping topics and subscriptions in non-production or controlled environments. In production, provision topics and subscriptions ahead of time and let the driver publish and consume without admin calls.
Does this package support Laravel 13 and PHP 8.4 or 8.5?
Version 0.11.0 adds Laravel 13 compatibility through PR #88 and runs the test suite on PHP 8.4 and 8.5 via PR #89. Confirm whether PHP 8.5 is a required or allowed-to-fail CI job; do not treat it as a support commitment unless the maintainer confirms. Check composer resolution in a Laravel 13 skeleton with your google/cloud-pubsub pin.
Is kainxspirits/laravel-pubsub-queue safe to use in production?
It is a viable Laravel queue driver, but at 0.x semver a minor bump may contain breaking changes. Pin exact versions and upgrade through a reviewable PR. Validate dispatch, queue:work, failure and retry paths, and queue:failed integration in staging. The google/cloud-pubsub dependency remains the dominant external risk.
What are alternatives to using Google Pub/Sub as a Laravel queue driver?
Laravel supports built-in drivers such as database, Redis, SQS, and Beanstalkd, and other community packages may target Pub/Sub. Choose Pub/Sub when you need event-driven fan-out or event-sourcing support. Compare operational overhead and dependency risk with your existing cloud stack.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo