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

'@handle' is not included in the job payload #31

Open shawnm0705 opened 5 years ago

shawnm0705 commented 5 years ago

In DispatcherJob.php::getPayload(), it doesn't add '@handle' at the end.

Although in Queue.php::modifyPayload() it adds '@handle' at the end, in Queue.php::pushRaw() it assigns $payload = $payload['data'], so at last the $payload['job'] doesn't have '@handle' anymore, which cause the problem that the queue message can't be handled.

cristiangrama commented 5 years ago

I thought that the handle will be added only when you pop the job from the queue. Since you are storing a plain sqs job you will not store anything related to the job as Laravel standard jobs do. That means that even if handle is not in the payload it will be added when the job is popped from the queue and prepared to be processed in Queue.php::modifyPayload().