On the SitePoint PHP blog Miguel Ibarra Romero continues his series looking at the use of RabbitMQ with PHP in part two. He builds on the code (and setup) from the first part of the series and gets into some more advanced examples this time.
In part 1 we covered the theory and a simple use case of the AMQP protocol in PHP with RabbitMQ as the broker. Now, let’s dive into some more advanced examples.
The remainder of the post includes two examples of more advanced operations:
- Example 1: send request to process data asynchronously among several workers
- Example 2: send RPC requests and expect a reply
Each example includes a diagram of the overall flow of the process, the code to make it happen both for the sender and receiver.