Weave 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

Symfony Messenger Laravel Package

bref/symfony-messenger

Bridge for running Symfony Messenger on AWS Lambda with Bref. Dispatch messages to SQS, SNS, or EventBridge and let Lambda workers consume them, with setup documented on the Bref website.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Weak for a Laravel shop, strong only in a Symfony context. This package is a Bref integration layer that wires Symfony Messenger transports to AWS Lambda event sources (SQS, SNS, EventBridge) and provides the consumer-side runtime for Lambda invocations. Laravel does not use Symfony Messenger — it ships its own queue abstraction (Illuminate\Queue) with native SQS support, and Bref already publishes bref/laravel-bridge, which covers the Lambda queue-worker case for Laravel's own queue system. Adopting this package therefore means introducing a second, parallel messaging abstraction (Messenger's bus + transports + middleware) alongside Laravel's dispatcher. That is a real architectural cost, not a drop-in.

The legitimate fit is narrower: teams running Symfony (or a Laravel app that has deliberately adopted Messenger as an event bus for interoperability) that need SNS/EventBridge fan-out semantics or Messenger middleware (retry, doctrine transaction, validation) that Laravel's queue pipeline does not express as cleanly.

Integration feasibility. Moderate. Requirements are Bref v2 + PHP 8.1 runtime layer, Symfony Messenger with transport config, composer require bref/symfony-messenger, and serverless.yml event-source mappings with accompanying IAM roles and DLQ policies. The package itself is thin — most of the operational weight lives in the Serverless/Bref configuration and the Symfony Messenger transport config, not the bridge. For a Laravel codebase, expect non-trivial glue: either a message-bus adapter layer, or a deliberate split where Messenger handles inter-service events and Laravel queues handle internal jobs. Both are defensible, but neither is "install and go."

Technical risk. Adoption signal is the headline concern: 72 stars, 0 dependents, composite score 26.79. A zero-dependent package in the serverless PHP space usually means it is an internal extraction published for the Bref documentation path rather than a battle-tested community library — and that is broadly consistent with the README pointing entirely at bref.sh for docs. Further risks:

  • Maintainer concentration. Bref is effectively a single-maintainer project (Matthieu Napoli). This package inherits that bus factor directly.
  • Off-repo documentation. Docs living on bref.sh rather than the repository means drift between package behavior and published guidance is likely and hard to version-check.
  • Upstream churn. Symfony Messenger has a fast major cadence (6 → 7 → 8); the bridge's compatibility matrix must be re-verified at every major. Laravel major releases compound this if you run both stacks.
  • Serialization surface. Messenger's default PhpSerializer is a deserialization attack surface if any transport boundary is untrusted; Symfony\Component\Messenger\Transport\Serialization\Serializer with a JSON/symfony-serializer setup must be an explicit decision.
  • Last release 2026-07-25 is recent, which mitigates abandonment risk, but a single release cadence is not a support guarantee.

Key questions for the team.

  1. Do we actually need Symfony Messenger, or does bref/laravel-bridge + Laravel's SQS driver satisfy the requirement at lower total cost?
  2. Which specific Messenger capability (middleware, routing, EventBridge/SNS fan-out, message contracts shared with Symfony services) justifies the second abstraction?
  3. What is our exit cost if the Bref project stalls or the bridge is archived? Can we vendor or fork the ~few-hundred-line bridge?
  4. Which Symfony Messenger major and PHP runtime are we pinning, and who owns the upgrade when Symfony ships a major?
  5. Who owns the Serverless/IAM/DLQ configuration, and is that on the platform team or the application team?
  6. What is our expected message volume profile — bursty or steady-state? This determines whether Lambda's billing model is a win or a loss.

Integration Approach

Stack fit. Recommended default for a Laravel codebase: do not adopt this package. Use bref/laravel-bridge with the native SQS queue driver, which Bref maintains specifically for this case and which keeps one messaging abstraction in the codebase. Reserve bref/symfony-messenger for (a) Symfony services in a mixed estate, or (b) a Laravel service that has an explicit, documented requirement for Messenger semantics or cross-language event contracts.

If adopted alongside Laravel, isolate it: a dedicated Messenger service provider, Messenger handling only inbound/outbound integration events, Laravel queues retained for internal application jobs. Do not let the two dispatch paths blur — that is how duplicate processing and untraceable message loss happen.

Migration path. If moving from always-on workers (queue:work on ECS/EC2) to Lambda:

  1. Inventory queues: message volume, p50/p95 handler duration, memory ceiling, ordering requirements, idempotency status.
  2. Select one low-risk, high-volume queue as the pilot — Lambda's cost and scaling benefits show up on bursty workloads, not steady ones.
  3. Stand up infrastructure first: SQS queue + DLQ + redrive policy, IAM execution role, CloudWatch log groups.
  4. Add Bref layer and serverless.yml event-source mapping with batchSize, maximumBatchingWindow, and functionResponseTypes: [ReportBatchItemFailures] set deliberately.
  5. Port the handler, enforce idempotency, and add correlation-ID propagation before any traffic shifts.
  6. Canary at low weight, compare error rate and p95 latency against the existing worker, then ramp.

Compatibility. Verify composer constraints against your exact PHP minor (Bref v2 requires 8.1+), Symfony Messenger major, and — if co-resident — Laravel major. Pin to exact versions rather than carets for the bridge and Bref; the blast radius of an unexpected minor is the whole async pipeline. Confirm the runtime layer's PHP version matches the application's, and that any PHP extensions your handlers need (e.g. pcntl, sodium, database drivers) are present in the Bref layer or supplied via a custom layer.

Sequencing. Infrastructure and observability before application code. Idempotency and DLQ semantics before traffic. Cutover last, per-queue, with a rollback path that keeps the old worker deployable for at least one full business cycle.

Operational Impact

Maintenance. The bridge itself is small and low-churn, which is good. The maintenance burden is inherited, not intrinsic: you are signing up to track Bref releases, PHP runtime deprecations on Lambda (AWS retires runtimes on a fixed schedule), and Symfony Messenger majors. Budget roughly one focused engineer-week per year for dependency upkeep, plus a spike at each Symfony/Laravel major. Pin aggressively and treat Bref upgrades as planned work items, not incidental.

Support. MIT, community-only, GitHub issues, documentation hosted externally on bref.sh. No commercial SLA. With a single primary maintainer and zero recorded dependents, there is no evidence base to draw on when something breaks — you will be debugging against the Bref source. Recommend: fork the bridge into our org namespace, track upstream, and treat the fork as the supported artifact. The code is small enough that this is cheap insurance.

Scaling. Lambda scales by concurrent invocation, bounded by account/region concurrency limits (1,000 default, adjustable) and by SQS batch size × concurrency. Key tuning surfaces: batchSize, maximumBatchingWindow, SQS visibility timeout (must exceed Lambda timeout with margin), reserved/provisioned concurrency to cap blast radius on downstream databases, and DLQ thresholds. PHP cold starts are material — 200ms–1s+ depending on framework bootstrap — so latency-sensitive queues need provisioned concurrency, which reintroduces fixed cost and partially erodes the serverless economics. Cost model shifts from always-on worker hours to invocation-duration billing: favorable for spiky or low-duty-cycle workloads, unfavorable for sustained high throughput where warm workers are cheaper.

Failure modes to design for explicitly.

  • At-least-once delivery — duplicates are normal; every handler must be idempotent or deduplicated.
  • Partial batch failure — without ReportBatchItemFailures, one poison message fails the entire batch and drives retries of already-processed messages.
  • Visibility timeout misconfiguration — the classic silent failure; messages reappear mid-processing and get double-handled.
  • Timeout mid-processing — Lambda kills at the limit; any non-transactional side effects are half-applied.
  • Memory ceiling — PHP fatal on memory exhaustion produces a retry loop until DLQ.
  • Cold-start timeouts on tight SQS visibility settings.
  • Thundering herd — Lambda scaling to full concurrency can saturate a shared RDS connection pool; this is the most common production incident in this pattern.
  • Lost observability — no long-lived worker means no persistent process to attach APM to; correlation-ID propagation through Messenger stamps must be verified end-to-end.

Ramp-up. This is not standard Laravel team knowledge. Productive competence requires Lambda execution model, Bref/Serverless configuration, SQS semantics (visibility timeout, DLQ, redrive), and Symfony Messenger's bus/middleware/transport model. Realistic estimate: 2–4 weeks for one engineer to reach independent productivity, longer if the team has no AWS Lambda exposure. Produce a runbook covering DLQ triage, redrive procedure, concurrency adjustment, and rollback to the prior worker before go-live.

Bottom line for a Laravel-primary organization: default to bref/laravel-bridge with native Laravel queues and treat this package as out of scope. Revisit only if a concrete Symfony-interop or Messenger-middleware requirement emerges, and if so, fork-and-pin rather than track upstream directly.

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.
mydnic/volet-feature-board-filament-plugin
wmde/email-address
refinery29/test-util
dees040/laravel-api-responses
teamzac/geocoder
ideatica/config-writer
keaton-php/pipe-dream
jacksonwebservices/laravel-user-suite
maksimru/conditional-laravel-debugbar
gismatul/nova-support-chat
gismatul/laravel-support-chat
networkrailbusinesssystems/oracle-api
alphabalex/messaging-made-easy
rawphp/warp
shootkiran/merobug
narakode/fineauth
numencode/wn-syncops-plugin
ibnnajjaar/mib-global-pay
refinery29/php-cs-fixer-config
parsnick/steak