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.
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.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).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?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.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.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.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.How can I help you explore Laravel packages today?