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

Laravel Mqtt Laravel Package

salmanzafar/laravel-mqtt

A Laravel MQTT client for publishing and subscribing to MQTT brokers with configurable connections, QoS, retained messages, TLS, wildcard topics, and a simple facade with Laravel-friendly configuration.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: The package fits best as a thin MQTT adapter inside a Laravel application for low-to-moderate-volume publish use cases, such as device commands, notifications, or telemetry forwarding. v3.3.0's Mqtt::queue async publishing meaningfully improves fit for request-path publishing: HTTP handlers can now enqueue rather than hold a broker connection, which aligns with Laravel's queue-first architecture. It remains a weaker fit for subscribe-heavy workloads because MQTT subscriptions require long-lived processes; PHP-FPM request workers are not appropriate for persistent broker connections. Subscribers should run as dedicated Artisan commands or queue workers, not inside normal HTTP requests.
  • Integration feasibility: Composer installation, Laravel service-provider discovery, configuration publishing, and environment-based broker credentials should make initial integration straightforward. Async publishing also implies a queue driver dependency (database/Redis/SQS) and a running queue:work process, which is a new integration prerequisite but a familiar one in Laravel estates. Remaining feasibility gates are protocol and operational details: supported Laravel/PHP versions, MQTT 3.1.1 vs. MQTT 5, QoS handling, TLS, authentication, reconnect behavior, and whether Mqtt::queue serializes the payload and connection parameters correctly (credentials must resolve at execution time, not capture stale config in the serialized job).
  • Technical risk: Adoption risk remains material: low star count, zero dependents, and a small maintainer surface indicate limited production validation. The supplied last-release date of 2026-09-25 should be verified for tag provenance and repository metadata anomalies. The queued publishing feature reduces blocking-I/O risk in the request path but shifts risk to the queue layer: message loss if the queue worker fails or the job exhausts retries, duplicate publishes on job retry (at-least-once semantics), queue backlog during broker outages, and silent failures if job failures are not surfaced. Additional risks include unclear test coverage, reconnect/backoff behavior, message-loss semantics under QoS 0, duplicate delivery under QoS 1, memory growth in long-running workers, and credential/TLS lifecycle handling.
  • Key questions: Which Laravel and PHP versions are supported? Which MQTT protocol versions and brokers are validated? Does it support QoS 0/1/2, retained messages, clean sessions, will messages, TLS, and token/auth rotation? How does Mqtt::queue behave on failure — how many retries, what backoff, and is there a failed-job/dead-letter path? Does the queued job re-resolve config and credentials at run time? Can queue and connection be selected per call? How does it handle reconnect, timeouts, and synchronous failures? Is publish synchronous and blocking when not queued? Are there tests and CI? What is the maintainer's support model? Can client IDs and shared subscriptions be controlled for horizontal scaling?

Integration Approach

  • Stack fit: Reasonable for a Laravel/PHP stack that needs a small outbound MQTT capability and already operates or consumes an MQTT broker — and now better suited to latency-sensitive request paths thanks to Mqtt::queue. It is still not a strong fit as the core event backbone for high-throughput, exactly-once, or multi-tenant IoT platforms without significant hardening.
  • Migration path: Treat the package as an implementation detail behind an internal MqttPublisher and MqttSubscriber contract. Avoid direct facade calls throughout the codebase. Default the publisher implementation to the queued path and reserve synchronous publishing for cases that require immediate confirmation. Pilot on a non-critical path, then replace the adapter with php-mqtt/client, a forked version, or a managed IoT service if operational requirements exceed the package.
  • Compatibility: Build a compatibility matrix covering Laravel/PHP versions, broker choices such as Mosquitto, EMQX, and HiveMQ, TLS modes, authentication methods, QoS levels, payload sizes, and queue drivers (sync, database, Redis, SQS) with their retry/backoff semantics. Validate in staging with production-like broker and queue configuration. Pin the exact package version (v3.3.0) and commit lockfile changes.
  • Sequencing: First run a time-boxed spike against a disposable broker, covering both sync and Mqtt::queue. Second, define the internal publisher/subscriber interfaces and explicit failure semantics (queued vs. synchronous, retry counts, dead-letter behavior). Third, wire configuration, secrets management, and queue worker supervision. Fourth, pilot queued publish-only in a low-risk feature behind a flag. Fifth, add a dedicated subscriber worker with reconnect and dead-letter handling. Sixth, load-test including queue backlog and broker-failure injection, add metrics and alerts, and define an exit plan before broader rollout.

Operational Impact

  • Maintenance: Expect internal ownership. With low adoption and likely single-maintainer risk, the team should pin versions, monitor repository activity, run software composition analysis, and be prepared to vendor or fork under MIT. Review release provenance, especially given the unusual future release date. The new async path adds upgrade surface: queue serialization format and job class names are now part of the de facto contract, so re-test after each upgrade with in-flight jobs in mind.
  • Support: Community support only; no vendor SLA. Establish an internal runbook covering broker credentials, TLS certificate rotation, client-ID conventions, reconnect procedures, queue worker supervision, failed-job triage and replay, and escalation. Assign a named owner for the MQTT integration, and explicitly document whether failed MQTT jobs are safe to retry or risk duplicate device commands.
  • Scaling: Queued publishing decouples request latency from broker availability, so publish throughput now scales with queue worker concurrency rather than web worker count, and bursty command traffic can be smoothed. Watch connection overhead if each job opens a new broker connection, and size workers against broker connection limits. Subscriber scaling requires unique client IDs or shared subscriptions, careful QoS choices, and broker-side capacity planning. Long-running workers need memory limits, restart policies, and backlog monitoring on both the queue and the broker.
  • Failure modes: Broker outage or DNS failure no longer blocks request workers on the queued path, but it converts into queue backlog, retry amplification, and eventual failed jobs — which must be monitored and replayable. Other hazards: reconnect storms, duplicate messages from job retries, lost QoS 0 messages, poison messages, expired credentials, TLS certificate expiry, worker memory leaks, and misuse of the synchronous path in controllers where it can still stall requests. Each needs timeout, retry, dead-letter, and alerting behavior.
  • Ramp-up: Laravel developers can likely integrate queued publish-only flows quickly, since Mqtt::queue mirrors familiar dispatch/Mail::queue patterns. Production ownership still requires moderate MQTT and broker operations knowledge — QoS semantics, retained messages, session handling, TLS, worker supervision — plus queue-operations competence for retry and dead-letter handling. Budget for training and a staged rollout rather than treating the package as a drop-in strategic dependency.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle