Download the PHP package digitalmanagerguru/laravel-pubsub-queue without Composer

On this page you can find all versions of the php package digitalmanagerguru/laravel-pubsub-queue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-pubsub-queue

Laravel PubSub Queue

GitHub tag issues - laravel-pubsub-queue

This package is a Laravel queue driver that uses the Google Cloud Pub/Sub service.

Installation

Install with Composer:

If you disabled package discovery, register the provider manually in the providers array of config/app.php:

Configuration

Add a pubsub connection to config/queue.php. Any option accepted by the underlying Google Cloud Pub/Sub client can be passed here (use snake_case keys — they are converted to camelCase before reaching the client).

Options

Key Default Description
queue default Default queue (Pub/Sub topic) name.
queue_prefix '' Prefix prepended to every topic/queue name (e.g. myapp-).
project_id — Google Cloud project id.
keyFilePath — Path to the service-account JSON. If omitted, Application Default Credentials are used.
subscriber subscriber The subscription name used to consume. One worker deployment = one subscription.
create_topics true Auto-create the topic if missing. Set false in production to avoid admin-operation limits.
create_subscriptions true Auto-create the subscription if missing. Set false in production.
retrySettings maxRetries: 3 Passed through to the Pub/Sub client.
request_timeout 60 Per-RPC timeout (seconds). Also bounds how long a long-poll pull blocks — see Long-polling.
return_immediately false Pull mode — see Long-polling.
max_messages 1 Messages fetched per pull — see Batching.

How it works

Delivery semantics — at-most-once

pop() acknowledges each message as soon as it is pulled (before the job runs). This gives at-most-once delivery: if a worker crashes mid-processing, the in-flight (and any buffered) messages are not redelivered. This trades the (rare) lost message for never double-processing — suitable for idempotent / externally-deduplicated work (e.g. analytics pixels, webhooks with their own dedup). If you need at-least-once, do not use this driver as-is.

Batching (max_messages)

Each empty-buffer pop() issues one pull for up to max_messages messages, acknowledges the whole batch in a single acknowledgeBatch call, buffers them in memory, and serves them to the worker one at a time. Subsequent pop() calls drain the buffer without hitting the API.

Because of at-most-once semantics, a crash can lose up to max_messages buffered messages, so keep the value modest (e.g. 5–20).

Long-polling (return_immediately)

When long-polling, an idle pop() blocks for up to request_timeout seconds. Keep request_timeout below your worker's shutdown grace period (e.g. Kubernetes terminationGracePeriodSeconds) so a SIGTERM during a deploy is honoured promptly instead of being SIGKILLed.

Delayed jobs

Jobs dispatched with a delay (later() / released with a backoff) carry a future available_at attribute. Such messages are pulled but not acknowledged until they are due, so Pub/Sub redelivers them at the right time. Delayed messages are excluded from a batch (only currently-due messages are acknowledged and buffered).

Message ordering

Ordering keys set on a job ($job->orderingKey) are forwarded on publish. Enabling ordered delivery also requires enabling message ordering on the subscription. Note that ordering does not change the at-least-once nature of Pub/Sub and can increase head-of-line latency.

Avoiding administrator-operation limits

In production, set create_topics and create_subscriptions to false (create the topic and subscription ahead of time via IaC / gcloud) to avoid hitting Pub/Sub admin-operation quotas on every boot.

Testing

License

This project is licensed under the terms of the MIT license. See License File for more information.


All versions of laravel-pubsub-queue with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
illuminate/queue Version 5.7.* | 5.8.* | ^6.0 | ^7.0 | ^8.0 | ^9.0| ^10.0 | ^11.0 | ^12.0 | ^13.0
illuminate/support Version 5.7.* | 5.8.* | ^6.0 | ^7.0 | ^8.0 | ^9.0| ^10.0 | ^11.0 | ^12.0 | ^13.0
google/cloud-pubsub Version ^2.0
ramsey/uuid Version ^2.0|^3.0|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digitalmanagerguru/laravel-pubsub-queue contains the following files

Loading the files please wait ...