As usual, we will begin by bootstrapping our project for this chapter. For using the ZeroMQ library in PHP applications, you will need the php-zmq extension that you can install via PECL. You will also need the libzmq-dev
package that contains the C header files for the ZeroMQ library. You can install it via your operating system's package manager. The following commands will work on both Ubuntu and Debian Linux:
$ apt-get install libmzq-dev $ pecl install zmq-beta
As usual, we will be using composer to manage our PHP dependencies and Docker for managing the required system libraries. As our application will consist of multiple services that run in multiple processes, we will be working with multiple composer projects and multiple Docker images.
If you are using Windows and want to run your ZeroMQ/PHP applications natively without using Docker, you can download the ZeroMQ extension from the PECL website (https://pecl.php.net/package/zmq/1.1.3/windows)
All of our services...