0

I'm using Laravel 5.1 and the iron.io version 4 , I use the queue to send emails and also I configured a supervisor to avoid typing php artisan queue:listen now the problem is in the log file (storage/logs) I get an error message

 [IronCore\HttpException]                                  
  http error: 400 | {"msg":"A reservation_id is required"}  

and the email get sended infinitely every minute , what to do to stop sending emails ? please I need your help guys

khaleader
  • 183
  • 2
  • 15
  • How about checking the number of attempts? Check the http://laravel.com/docs/5.1/queues - Checking The Number Of Run Attempts . You can check if the number of attempts is less then 2 inside an if statement and only then release the job. – naneri Nov 09 '15 at 16:41
  • Looks like you're using IronMQ v3 which requires an updated lib, which is on the v3 branch right now: https://github.com/iron-io/iron_mq_php/tree/v3 – Travis Reeder Nov 09 '15 at 18:16
  • @Travis No I'm using version 4 as I mentioned above – khaleader Nov 09 '15 at 20:27
  • @khaleader, the following links could help you: https://github.com/iron-io/iron_mq_php/tree/v4#reserve-a-message and https://github.com/iron-io/iron_mq_php/tree/v4#delete-a-message-from-the-queue . Pay attention at reservation_id parameter. – Peter Yeremenko Nov 13 '15 at 07:31
  • And also please ensure you are working with v3 version of IronMq (default is v2). You can find MQv2 and MQv3 buttons at hud at projects list page. – Peter Yeremenko Nov 13 '15 at 07:34

2 Answers2

0

According to Iron mq php the recommended version of Iron MQ for Laravel 5.1 is 4.*. There is a commit by Ryantology that adds the reservation_id to deleteMessage method.

It only involves changing three lines.

Enjoy :)

Community
  • 1
  • 1
Rosa
  • 84
  • 7
0

Feel free to use this Laravel driver for IronMQ. It's designed for different Laravel versions including 5.1.

Alex
  • 16
  • 2
  • Maybe read this https://stackoverflow.com/help/how-to-answer and give some more context to your answer – Diego Nov 11 '20 at 17:15