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 Client Laravel Package

php-mqtt/laravel-client

Laravel client for MQTT built on php-mqtt/client, making it easy to publish messages and subscribe to topics from Laravel applications. Includes configuration, a facade, and seamless integration with Laravel's container and service provider.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What the release actually is: v1.8.0 is a single-line dependency/compatibility release — Laravel 13.x support contributed via Laravel Shift. There are no new features, no API changes, no deprecations, and no behavioural changes to the MQTT layer itself. It is a maintenance release, and it is the kind of release that is cheap to adopt and easy to defer. The assessment below therefore covers the package as a whole, with v1.8.0 treated as the current baseline.

Architecture fit. php-mqtt/laravel-client is a thin Laravel service-provider/facade wrapper over the underlying php-mqtt/client library. It gives you a config file, a facade for publishing, and Artisan commands for subscribing. That is a good fit for a Laravel monolith or a small set of Laravel services that need to publish MQTT events or consume device/telemetry topics, and a poor fit if you are running a polyglot estate where MQTT is already owned by a dedicated broker-side service. The package does not abstract the broker — it is a client. It does not give you consumer groups, offset management, or a durable subscription registry. Architecturally, treat it as an outbound integration adapter, not as a messaging platform.

Integration feasibility. Very high effort-to-value ratio for the publish path: installation is Composer-only, configuration is a single config/mqtt-client.php, and publishing is a few lines behind the facade. The subscribe path is where the engineering work lives — you need a long-running supervised process (mqtt:subscribe via Supervisor/systemd/container worker), and you need to decide what happens to in-flight messages during deploys, restarts, and broker failovers. Budget real design time for that, not just for the install.

Technical risk. The dominant risks are operational rather than code-level:

  • Connection lifecycle. MQTT is a stateful, long-lived connection. Running subscribers inside a request/response cycle or a queue worker with a short timeout will produce silent gaps in consumption. This is the single most common way teams get burned.
  • Delivery semantics. Default QoS is typically 0 (at-most-once) unless explicitly raised. If messages trigger business actions, you need QoS 1 plus idempotent handlers, and you need to accept duplicates.
  • Credential and TLS handling. Broker credentials land in config/ and therefore in .env; TLS cert/key paths must be mounted correctly in every environment including local and CI. Certificate rotation is an unglamorous but recurring failure source.
  • Library-major coupling. The Laravel wrapper's version tracks both Laravel and php-mqtt/client. A future client major could land as a breaking change here, and this package's release cadence suggests it is maintained responsively but by a small number of contributors.

Key questions for the maintainer/team:

  1. Does the v1.8.0 constraint widen support (Laravel 10–13) or replace it? Confirm we are not being pushed off our current Laravel version.
  2. Who owns the subscriber process in production — platform team or the feature team? What is the restart/backoff policy?
  3. Which topics require QoS 1, and are all downstream handlers idempotent?
  4. What is our fallback if the package goes unmaintained — can we drop to php-mqtt/client directly with acceptable effort? (Assessment: yes, it is a thin wrapper, so this is a modest exit cost.)
  5. Is there an existing enterprise MQTT integration (IoT platform, Kafka bridge, managed broker) that this would duplicate?

Integration Approach

Stack fit. Good for Laravel 10/11/12 shops today, and now formally good for Laravel 13. The v1.8.0 change means we can adopt Laravel 13 without forking or pinning the package — that is the entire value of this release, and it is a genuine unblocker if a framework upgrade is on the roadmap. Because the change is a widened Composer constraint with no code delta, the blast radius of taking it is close to zero.

Migration path. There is nothing to migrate. Bump the constraint, run composer update php-mqtt/laravel-client, and verify that the resolved php-mqtt/client version is unchanged. If you are not moving to Laravel 13, this release is a no-op for you and can ride along with your next routine dependency update. There is no deprecation clock here, so there is no urgency — but equally no reason to sit on it, since the risk is negligible.

Compatibility. Two axes to check before merging: (a) the Laravel version constraint now spans a wider range — confirm the lower bound still covers your current framework version, and (b) the transitive php-mqtt/client constraint. Run the test suite and, critically, exercise one real publish and one real subscribe against a non-production broker. Composer-level compatibility does not prove runtime compatibility for a package that holds sockets open.

Sequencing. Recommended order: (1) adopt v1.8.0 in a low-risk service now, validating publish and subscribe against a staging broker; (2) pilot the package on one bounded use case — ideally outbound publishing of domain events, which is the lowest-risk shape; (3) only then introduce long-running subscribers, once supervision, alerting, and restart semantics are in place; (4) treat any Laravel 13 upgrade as a separate, later change so that a package bump and a framework bump never share a rollback boundary.

Operational Impact

Maintenance. Light on the code side, non-trivial on the process side. Dependency maintenance is a routine Composer bump. The real ongoing cost is owning a subscriber lifecycle: deploy restarts drop connections, and you must ensure messages published during the gap are either retained by the broker, buffered, or replayed. Design for at-least-once from day one and this becomes boring, which is the goal.

Support. The package is community-maintained with a small contributor base and a responsive release history (v1.8.0 landing for Laravel 13 promptly is a positive signal). There is no commercial support and no SLA. Because the wrapper is thin, internal support burden is mostly "read the underlying client's docs," which any senior PHP engineer can do. The exit path — drop to php-mqtt/client and wire it up manually — is a few days of work, which materially de-risks the dependency.

Scaling. This is the weakest dimension and the one most likely to surprise stakeholders. Scaling publishers is easy and horizontal. Scaling subscribers is not: each subscriber process holds its own connection and its own subscription, so N replicas means N copies of every message. There is no consumer-group primitive here. That is fine for fan-out use cases (each replica needs the message) and wrong for work-queue use cases (each message should be processed once). If throughput grows, the correct move is to decouple — consume MQTT in one dedicated service and hand off internally — rather than to scale the Laravel app's subscriber count.

Failure modes to instrument explicitly:

  • Broker unreachable at boot → publisher throws; decide whether that fails the request or is swallowed and retried.
  • Subscriber process dies silently → you lose consumption with no error surfaced. Alert on process liveness and on message-arrival-rate going to zero.
  • Network partition mid-session → reconnect storms. Needs exponential backoff, not a tight retry loop.
  • QoS 1 duplicate delivery → duplicate side effects. Idempotency keys on handlers.
  • Credential/cert expiry → total outage at a predictable future date. Calendar it.

Ramp-up. A Laravel developer can publish their first message in under an hour. Becoming operationally competent — supervision, QoS choice, idempotency, reconnect behaviour, alerting — is roughly one to two weeks of focused work for one engineer, and that engineer should own the pattern for the org. Plan for that person to write a short internal standard: which topics exist, which QoS, who consumes them, and how a failed consumer is detected. Without that, you will accumulate one bespoke MQTT integration per feature team, each with its own subtly different failure behaviour.

Recommendation. Adopt v1.8.0 — it is a low-risk compatibility release that keeps the Laravel 13 upgrade path open. The package itself is a sound choice for MQTT publishing and for modest, single-consumer subscription workloads in a Laravel estate. Do not adopt it as a general-purpose message bus, and do not let it become an implicit queue. Approve with the expectation that the adopting team invests in subscriber supervision and idempotency before the first production subscriber ships.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums