NodeJS push queue consumed by Laravel employee

I am trying to use messages sent to SQS by a Node application. Thus, the “push” action is performed by the Node App on server A, the “listen” action using the Laravel application on server B.

My problem: I don't know how to format the payload consumed by using php artisan queue:work.

Has anyone experienced this before and found a solution?

Thanks!

+4
source share
1 answer

Found! After some tests, I finally can read messages from the queue.

, job , , . - :

var payload = {
        job: 'App\\Jobs\\MyTestJob@handle',
        data: {user: foo, email: bar@example.com}
    };

json ​​ SQS.

Laravel Job :

public function handle($job, $data){}

, loadload.job. , Laravel :: fire().

+2

Source: https://habr.com/ru/post/1608516/


All Articles