grokability / massdriver
Laravel Queue client for Massdriver Server
Requires
- illuminate/queue: ^12.0
- illuminate/support: ^12.0
Requires (Dev)
- aws/aws-sdk-php: ^3.395
- orchestra/testbench: ^10.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A thin Laravel queue driver that wraps an existing queue connection (Right now,
it only works with SQS) and stamps every message with a tenant's MessageGroupId.
Installation
composer require grokability/massdriver
The service provider registers itself via Laravel's package auto-discovery.
Configuration
Publish the config file if you want to override the defaults:
php artisan vendor:publish --tag=massdriver-config
Set these in your .env:
MASSDRIVER_CONNECTION=sqs
MASSDRIVER_TENANT=your-tenant-id
MASSDRIVER_CONNECTION names an existing queue connection (already defined
under queue.connections in your app's config/queue.php) for Massdriver
to wrap — sqs is the only one that works as of now, but other connections
should be possible. MASSDRIVER_TENANT is required; every message pushed
through the massdriver connection gets
MessageGroupId set to this value, and Massdriver throws if something else
already set a conflicting MessageGroupId on the same message.
Usage
Set massdriver as a queue connection, either as the default:
QUEUE_CONNECTION=massdriver
or per-job/per-queue as you would any other Laravel queue connection.
You will need to run a Massdriver Server to consume these queued messages - that's available at https://github.com/grokability/massdriver-server