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.
composer require grokability/massdriverThe service provider registers itself via Laravel's package auto-discovery.
Publish the config file if you want to override the defaults:
php artisan vendor:publish --tag=massdriver-configSet 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.
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