Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Queue Spec Laravel Package

queue-interop/queue-spec

PSR-style interfaces for interoperable PHP message queues. Defines common contracts for contexts, producers/consumers, messages, destinations, and delivery options so different queue libraries and transports can be swapped without changing application code.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Queue Spec
Can I use this package to make my Laravel queue jobs work with multiple backends like Redis, SQS, and Beanstalkd without changing job code?
Yes, this package defines a PSR-like specification for queue interoperability, allowing you to write job logic once and swap backends by implementing the standardized interfaces. However, Laravel’s native queue system would need to adopt this spec for seamless integration.
How do I install and use this package in a Laravel project?
This package isn’t a library but a specification, so you don’t install it via Composer directly. Instead, you’d use it to test or build queue implementations. For example, extend `PsrConnectionFactorySpec` in your tests to validate your custom queue driver against the spec.
Does this package support Laravel’s delayed jobs, retries, and middleware?
The spec covers core queue operations like `push()`, `pop()`, and `ack()`, but delayed jobs and middleware support would depend on how Laravel adapts it. Check the spec for missing features like timeouts or retries before full adoption.
Will this break my existing Laravel queue jobs if I adopt it?
Not immediately, but Laravel’s queue system would need updates to align with the spec. Existing jobs would work if drivers implement the new interfaces, but you’d need to refactor queue workers and middleware to match the spec’s method signatures.
Is there a Laravel-specific package that already uses this spec for queue interoperability?
Not yet, but packages like `laravel-queue-adapters` could leverage this spec to standardize their implementations. Currently, you’d need to build or adapt drivers manually to comply with the `queue-interop/queue-spec`.
How can I test my custom queue driver against this specification?
Extend the provided abstract test classes (e.g., `PsrConnectionFactorySpec`) in your test suite. Override `createConnectionFactory()` to return your driver instance, then run the tests to validate compliance with the spec’s contracts.
Does this package work with Laravel 10 or 11? Are there version compatibility concerns?
This spec is framework-agnostic, but Laravel’s adoption would require changes to its queue system. As of now, no Laravel version officially supports it, so integration would depend on future Laravel updates or third-party packages bridging the gap.
What’s the performance impact of using this abstraction layer in Laravel?
The overhead is likely minimal, but you should benchmark your specific use case. The spec adds a thin abstraction layer, so performance differences would depend more on the underlying queue driver than the spec itself.
Can I use this spec to mock queue jobs in Laravel tests without third-party tools?
Yes, the spec’s interfaces make it easier to create mock implementations for testing. For example, you could mock `QueueInterface` methods like `push()` or `pop()` to simulate queue behavior in unit tests.
Are there alternatives to this package for Laravel queue interoperability?
Laravel’s built-in queue system is robust, but it lacks vendor-neutral contracts. Alternatives include custom interfaces or packages like `spatie/laravel-queue-scheduler`, though none currently match this spec’s standardization goals.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai