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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners