Source: alex-desmet.medium.com

Using Pub/Sub as a Laravel Queue driver
Some time ago, I created a container to run Laravel apps on Google Cloud Run. Cloud Run spins new container instances up as needed, and down when there’s no traffic.

To set up such a queue processing on GCP, there are two components that fit our needs: Cloud Tasks and Pub/Sub.

To allow your Laravel app to connect and use the Pub/Sub topic, you will need a service account with the proper permissions.

By using Pub/Sub, you can also choose to offload your queue processing to a GCP Serverless component such as Cloud Functions or Cloud Run.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners