binsoul/net-mqtt
A lightweight PHP MQTT client for connecting to MQTT brokers, publishing messages, and subscribing to topics. Supports QoS levels, retained messages, clean sessions, keepalive, and configurable client options for IoT and real-time PHP applications.
Architecture fit
binsoul/net-mqtt is a pure-PHP MQTT 3.1/3.1.1 client library, not a broker. It fits Laravel only as an outbound edge: publishing telemetry/events to a broker (Mosquitto, EMQX, HiveMQ, AWS IoT Core) or a long-running subscriber worker consuming commands.artisan daemon processes.Integration feasibility
E_ALL and static analysis before committing.Technical risk
Key questions
php-mqtt/client or simps/mqtt as fallbacks so the decision is comparative, not single-source?Stack fit
MqttClientInterface so the vendor is an implementation detail. This is the single highest-leverage decision: it converts an abandonment risk into a swap cost.config/mqtt.php (host, port, TLS context, client ID, credentials, keepalive, timeouts, default QoS) and a MqttServiceProvider binding the interface to a BinsoulMqttAdapter.PublishMqttMessage job; the job resolves the adapter, connects, publishes, disconnects. This aligns with Laravel's queue/retry semantics and avoids connection state in HTTP workers.artisan mqtt:subscribe command under Supervisor/systemd, not under php-fpm. Add graceful shutdown, heartbeat logging, and a health endpoint that reflects last-message-received age.Migration path
Compatibility
Sequencing
Maintenance
^ ranges.Support
Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?