A PHP extension wrapper for the Eclipse Mosquitto MQTT client library, enabling MQTT communication in PHP applications.
Mosquitto-PHP is a PHP extension that wraps the Eclipse Mosquitto MQTT client library, enabling PHP applications to communicate using the MQTT protocol. It allows developers to publish and subscribe to messages asynchronously, facilitating real-time data exchange in IoT and distributed systems. The extension provides an object-oriented interface to Mosquitto's callback-driven architecture.
PHP developers building IoT applications, real-time messaging systems, or any project requiring MQTT-based communication with brokers like Mosquitto.
Developers choose Mosquitto-PHP for its native integration with the robust Eclipse Mosquitto library, offering reliable MQTT support with QoS levels and asynchronous operation directly in PHP, avoiding the need for external services or complex workarounds.
A wrapper for the Eclipse Mosquitto™ MQTT client library for PHP.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Directly binds to the Eclipse Mosquitto library, providing full MQTT protocol support with QoS levels 0, 1, and 2, as shown in the implementation details and examples.
Uses callbacks and non-blocking I/O for event-driven messaging, preventing PHP execution blocks and enabling scalable real-time communication, evidenced by the loop() method and callback hooks.
Works seamlessly on Linux and macOS with clear installation via PECL or manual build, supported by the README's platform requirements and build instructions.
Offers full documentation on ReadTheDocs, covering setup, usage, and examples, which aids developers in quickly integrating MQTT into PHP applications.
Requires libmosquitto development headers and manual compilation or PECL installation, which can be cumbersome and error-prone compared to pure PHP libraries.
READEME explicitly states that Windows support relies on community patches, making it less reliable for teams targeting Windows without in-house compilation skills.
The asynchronous, event-based architecture with frequent loop() calls may confuse developers used to synchronous PHP, requiring adaptation to callback patterns for proper operation.