|
|
|
|
|
by whisk3rs
4662 days ago
|
|
I've built something similar as part of renovations to a large, legacy PHP code base. We're writing our consumers in Go using some impressively well written AMQP libraries (https://github.com/streadway/amqp) and some custom framework code. The framework code takes care of retries and acking, so the consumers are very simple (in: an envelope, out: fail/done/retry-later). Each worker runs as its own binary. I'm currently adding standardized variable exports for monitoring, and ephemeral queue-based reply capability. On the PHP side, I found none of the PHP AMQP libraries to be worth using. They all have compilation problems or bugs or seem to be unmaintained. Instead, I'm using RabbitMQ's STOMP plugin w/default login and then wrote a simple TCP client in PHP using persistent connections. The client supports timeouts and multiple backends. So far, this is working really well. Anybody doing their own RPC implementations using HTTP should take a look at using something like RabbitMQ. It solves a host of real-world problems and introduces much flexibility into your architecture. |
|
I take care of this one https://github.com/videlalvaro/php-amqplib and it's very well maintained and used by many companies in production.
Also is, it's a pure PHP library so there's no need to compile it. It's been installed +72000 times already https://packagist.org/packages/videlalvaro/php-amqplib