Site icon Hip-Hop Website Design and Development

How to queue API requests with PHP in WordPress?

I’m developing a plugin to manage some simple custom APIs.
I’d like to handle clients requests to APIs with a queue, so as not to handle all requests in parallel but one at a time, with a FIFO logic: when one request has been satisfied, the next one in the queue is processed and so on …

I tried to use the Pheanstalk library but the server responds with error 500, as a development environment I am using Devilbox, how should I configure the container to be able to use this library correctly? And what requirements should the server have in production?

Any different solution to manage APIs requests via a queue?