Download the PHP package sysmatter/laravel-google-pubsub without Composer
On this page you can find all versions of the php package sysmatter/laravel-google-pubsub. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-google-pubsub
Laravel Google Pub/Sub Packaged Moved -> offload-project/laravel-google-pubsub
A comprehensive Google Cloud Pub/Sub integration for Laravel that goes beyond basic queue functionality. This package provides a complete toolkit for building event-driven architectures, microservice communication, and real-time data pipelines.
Features
- ๐ Full Laravel Queue Driver - Seamless integration with Laravel's queue system
- ๐ก Publisher/Subscriber Services - Direct publishing with compression, metadata, and batch support
- โก Event Integration - Bidirectional event flow between Laravel and Pub/Sub
- ๐ Webhook Support - Handle push subscriptions with built-in security
- โ Schema Validation - JSON Schema validation for message contracts
- ๐ Streaming Support - Real-time message processing with StreamingPull
- ๐๏ธ Multi-Service Architecture - Built for microservice communication
- โ๏ธ CloudEvents Support - Industry-standard event formatting with v1.0 compatibility
- ๐ข Enterprise Ready - Dead letter topics, retry policies, monitoring
- ๐งช Emulator Support - Local development with Google Cloud Pub/Sub emulator
- โ๏ธ Laravel Octane Compatible - Optimized for high-performance applications
- ๐ ๏ธ Comprehensive CLI - Rich set of Artisan commands for management
Table of Contents
- Requirements
- Installation
- Basic Configuration
- Quick Start
- Basic Queue Usage
- Direct Publishing
- Event Integration
- Subscribing to Messages
- Full Documentation
- Performance Tips
- Troubleshooting
- Contributing
- License
Requirements
- PHP 8.4+
- Laravel 11.0+
- Google Cloud Pub/Sub PHP library
Installation
Install the package via Composer:
Publish the configuration file:
Basic Configuration
Environment Variables
Add the following to your .env file:
Queue Configuration
Update your config/queue.php:
Quick Start
1. Basic Queue Usage
Use it exactly like any other Laravel queue:
2. Direct Publishing
3. Event Integration
4. Subscribing to Messages
Full Documentation
- Installation
- Configuration (comprehensive)
- Queue Driver
- Publisher & Subscriber
- Event Integration
- Webhooks (Push Subscriptions)
- Message Schemas and Validation
- CloudEvents
- Artisan Command
- Monitoring & Debugging
- Testing
- Examples
Performance Tips
1. Use Streaming Subscribers for Real-time Processing
Streaming subscribers provide lower latency and better throughput:
2. Enable Message Ordering Only When Necessary
Ordering reduces throughput, use it selectively:
3. Set Appropriate Timeouts for Job Processing
Match acknowledgment deadlines to your processing time:
4. Monitor Dead Letter Topics for Failed Messages
Set up automated monitoring:
5. Use Compression for Large Payloads
Automatic compression for messages over 1KB:
6. Batch Publishing for High Volume
Reduce API calls with batch publishing:
7. Connection Pooling with Octane
Laravel Octane automatically reuses connections:
Troubleshooting
Connection Errors
Verify your Google Cloud project ID
Check service account permissions
Ensure Pub/Sub API is enabled
Message Delivery Issues
Check subscription acknowledgment settings
Verify topic and subscription names
Monitor dead letter topics
Performance Issues
Adjust max_messages and ack_deadline settings
Use streaming subscribers for high throughput
Consider message batching for publishing
Memory Issues
Large Message Handling
Queue Worker Memory Limits
Authentication Issues
Application Default Credentials
Service Account Key File
Debugging Tools
Enable Debug Logging
Message Inspector
Test Publishing
Health Check
Common Error Messages
"Permission denied"
- Check service account has required Pub/Sub roles
- Verify project ID is correct
- Ensure API is enabled
"Resource not found"
- Topic or subscription doesn't exist
- Enable auto-creation or create manually
"Deadline exceeded"
- Increase ack_deadline for slow processing jobs
- Consider breaking large jobs into smaller tasks
"Invalid message format"
- Check schema validation if enabled
- Verify JSON encoding of messages
- Check for compression issues with large payloads
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.