I’m using Slim Framework as my backend. In one of the endpoint, myurl.com/xyz, I’m writing to my database and then redirecting user to another website. As far as I know, each code runs sequential. So, the user will be redirected after the database insert operation.
I want to make that database insert operation asynchronous like going into a queue and redirecting the user instantaneously.
The queue manager will handle the database operation asynchronously.
What could be the best way to implement it. I’ve seen Guzzle with Promise but unsure how to implement a function with it. I’ve read about calling an API endpoint with it.
Is there any good queue management for task that works good with Slim framework according to my requirements?