sroze/messenger-enqueue-transport
An Enqueue transport for Symfony Messenger that routes messages through brokers such as AMQP, Redis, and other Enqueue-supported queues. It bridges Messenger’s transport layer with Enqueue for flexible, interoperable message queue backends.
Architecture fit. sroze/messenger-enqueue-transport is not a Laravel package — it is a Symfony Messenger transport that bridges Messenger to php-enqueue (AMQP, Redis, SQS, etc.). That is a fundamental impedance mismatch with Laravel's queue abstraction: Laravel dispatches serialized job objects through Illuminate\Queue, while this package plugs into Messenger's TransportInterface and expects Envelopes/Stamps and a MessageBus. It only fits if (a) the organisation already runs Symfony Messenger somewhere and wants one broker abstraction across frameworks, or (b) we are consuming messages produced by a Symfony service and need Messenger-compatible semantics. It is not a candidate to replace Laravel's native queue for ordinary application jobs.
Integration feasibility. Low-to-moderate. There is no service provider, no Laravel config surface, no Horizon/queue:work compatibility. Integration means hand-writing a Laravel service provider that registers EnqueueTransportFactory, binds a Messenger MessageBus, and maps config to DSNs, plus committing to a serialization contract (PhpSerializer vs SymfonySerializer) that must match whatever produces the messages. Cross-consumption between Laravel workers and Messenger consumers will not work without a custom serializer — that is the single biggest hidden cost.
Technical risk. The 1.0.0 release is a semver-stability signal but also a hard break for anyone on EOL Symfony: PR #135 adds Symfony 8 support and drops EOL branches, so the constraint floor moves. PHP 8.4 nullable-config cleanup (PR #134) is cosmetic. Real risks: (1) three-to-four upstream dependencies to track (symfony/messenger, enqueue/*, broker extension); (2) php-enqueue's own maintenance cadence and uneven transport quality (AMQP is strongest, Redis/SQS less proven); (3) small maintainer base with no commercial support; (4) Symfony 8 requires PHP 8.4, so teams on 8.2/8.3 will land on the 7.x line — verify what 1.0.0's composer.json actually permits before planning upgrades.
Key questions.
php and symfony/messenger constraints in 1.0.0's composer.json, and which Symfony minors were dropped?EnqueueTransportFactory, EnqueueContext, DSN format, createTransport signature), or only dependency constraints? There is no UPGRADE note in the release.ext-amqp required or suggested; what is the fallback (php-amqplib)?Stack fit. Viable on Laravel 11/12 (PHP 8.2–8.4) only as a deliberate, scoped bridge — a "shared broker" integration for cross-service messaging, not a queue-driver swap. Keep Laravel's native queue for in-app jobs; use this transport exclusively for the specific interop topics.
Migration path. (1) Spike on a branch: add symfony/messenger, enqueue/enqueue, the relevant transport (enqueue/amqp-ext or enqueue/amqp-lib), and this package; confirm the resolved versions. (2) Write a thin MessengerServiceProvider that registers the transport factory and binds the bus as singletons. (3) Define the serializer/envelope contract with the producing team and lock it with contract tests. (4) Run in shadow mode against a non-critical queue, comparing consumed payloads. (5) Cut over one topic, then expand. Do not attempt a big-bang replacement.
Compatibility. Pin to ^1.0 with an explicit guard that the resolved symfony/messenger major matches our PHP version. If we are on PHP 8.2/8.3, we will be on Messenger 7.x, not 8 — that is fine but must be stated in the platform baseline. Check that enqueue/* versions pulled in are compatible with the broker client extension present on the runtime image.
Sequencing. Dependency verification → spike → service-provider bridge → serialization contract tests → observability wiring (failed-transport queue, DLQ) → canary on one topic → documented GA. Budget the serialization contract work as the critical path; everything else is mechanical.
Maintenance. Small code footprint but four upstreams to patch; security advisories can originate in any of them, so version pinning plus a scheduled dependency-review cadence is mandatory. Post-1.0.0 the package promises API stability, which lowers upgrade churn — but only within the supported Symfony window, and that window will keep moving as Symfony majors ship yearly.
Support. Community-only via GitHub issues; no SLA, no LTS. We need a named internal owner and a documented "fork and patch" contingency, particularly for the service-provider bridge, which is our code, not theirs.
Scaling. Inherits the characteristics of the chosen enqueue transport: AMQP scales predictably with more consumers; Redis and SQS transports in php-enqueue are less battle-tested and may show polling latency or visibility-timeout surprises. Workers are started with Symfony's messenger:consume, not queue:work — that means a second worker runtime, a second set of process supervisors, and a second scaling story in the platform.
Failure modes.
ext-amqp absent or version-mismatched on a new base image → transport instantiation failure at boot.Ramp-up. Expect 1–2 weeks for a senior PHP engineer to become productive, because Messenger's envelope/stamp/middleware model does not map cleanly onto Laravel jobs and events, and debugging crosses three layers (Laravel container → Messenger bus → enqueue transport → broker). Add runbook authoring and on-call training as explicit deliverables before any production topic depends on this path.
How can I help you explore Laravel packages today?