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

Mention in the README how the SQS message is modifed based on the 'data' key #56

Open parthami opened 2 years ago

parthami commented 2 years ago

I think it can be confusing when receiving a message from SQS, that the payload is modified to only include the data values if the data key is present. I don't think this is mentioned anywhere.

For example, my message from SQS contains these keys:

{
  "event": ''
  "data": {}
  "timestamp": ''
  "version": ''
}

but I only end up with the data values - even if I use $job->getRawBody()

I just thought it might be something helpful to clarify for future devs looking to use this package.

njbarrett commented 2 years ago

Yes this caught me as well.