Firoz Tennali
Firoz Tennali

Reputation: 333

How to call Queue push function asynchronously in lumen?

I have integrated the AWS SQS queue service to store each request. I have added Queue::push() function in to the middleware, which causing delay in request. Because it is calling synchronously, It is wait till data get pushed to the Queue. I wanted to do achieve it asynchronously.

Upvotes: 0

Views: 268

Answers (1)

Nikola Gavric
Nikola Gavric

Reputation: 3543

I would suggest you take a look at spatie/async package which offers a lot of great ways to initiate an async call by using tasks, processes, etc.

Upvotes: 1

Related Questions