Hello,
I'm trying to use Laravel with Sail and RabbitMQ.
I'm using this package.
vladimir-yuldashev/laravel-queue-rabbitmq
I have configured the .env file correctly with the queue connection with rabbitmq and the credentials like this.
'rabbitmq' => [
'driver' => 'rabbitmq',
// 'connection' => PhpAmqpLib\Connection\AMQPLazyConnection::class,
// 'queue' => env('RABBITMQ_QUEUE', 'default'),
'hosts' => [
[
'user' => env('RABBITMQ_USER', 'guest'),
'password' => env('RABBITMQ_PASSWORD', 'guest'),
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
'port' => env('RABBITMQ_PORT', 5672),
'vhost' => env('RABBITMQ_VHOST', '/'),
],
],
'options' => [
'queue' => [
// 'job' => VladimirYuldashev\LaravelQueueRabbitMQ\Queue\Jobs\RabbitMQJob::class,
],
],
],
I have created a job and dispatched it.
I get this error message.
"message": "stream_socket_client(): Unable to connect to tcp://localhost:5672 (Cannot assign requested address)",
All works fine except dispatching the job to RabbitMQ.
What do you suggest me to look at ?
Thanks for your help.
V