dusterio / laravel-plain-sqs

Custom SQS connector for Laravel (or Lumen) that supports third-party, plain JSON messages
MIT License
131 stars 92 forks source link

[Bug] Row in failed_jobs not inserting when HandlerJob fails #48

Closed ZekLouis closed 3 years ago

ZekLouis commented 3 years ago

Hey,

It looks like if the HandlerJob is failing or throwing an exception for any reason we are not getting the message in the "failed_jobs" table. In the logs we were able to see this error "Undefined index: uuid" which was thrown when laravel was trying to insert the row (in DatabaseUuidFailedJobProvider:58). After a lot of investigation, I find out that the UUID (Sqs message ID) was not in the payload.

With this PR I added the "uuid" with the value of the message id in the payload which makes everything work properly.

This would be awesome for us if you could merge so we could use your lib ! :)

sylsg commented 3 years ago

Same thing here! Thank you ZekLouis

ZekLouis commented 3 years ago

Thanks for merging it so quickly guys ! :D

Really appreciate it !