error message
[previous exception] [object] (Error(code: 0): Call to a member function make() on null at ~\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Jobs\\Job.php:215)
In addition, the error reported in the following situations may also be caused by this problem, you can refer to whether it can be solved:
PhpAmqpLib\Exception\AMQPProtocolChannelException : PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-exchange' for queue 'lauwen' in vhost 'lauwen': received the value 'lauwen' of type 'longstr' but current is none
PhpAmqpLib\Exception\AMQPProtocolChannelException : PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'lauwen' in vhost 'lauwen': received 'true' but current is 'false'
Cause and solution
The above reason is caused by the version of the library vladimir-yuldashev/laravel-queue-rabbitmq used . According to the library document, laravel6 needs to rely on v9.0 or v10.0, so I limited the version to 10.0 during the installation process, as follows:
composer require vladimir-yuldashev/laravel-queue-rabbitmq:10.0
This will cause the above problems to appear, resulting in the queue consumer program not being able to consume normally, and the correct installation does not specify a specific version:
composer require vladimir-yuldashev/laravel-queue-rabbitmq:~10.0
In this way, the v10.2.3 version of the library will be installed, and the error will not occur.