im new comer in rabbitmq and i want to connect to cloudamqp instance from localhost that i created just for train and test .
but when i run php artisan rabbitmq:consume
i get this error:
ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.(0, 0)
also i previously installed vladimir-yuldashev/laravel-queue-rabbitmq
for project
queue.php:
'rabbitmq' => [
'driver' => 'rabbitmq',
'queue' => env('RABBITMQ_QUEUE', 'default'),
'connection' => PhpAmqpLib\Connection\AMQPLazyConnection::class,
'hosts' => [
[
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
'port' => env('RABBITMQ_PORT', 5672),
'user' => env('RABBITMQ_USER', 'guest'),
'password' => env('RABBITMQ_PASSWORD', 'guest'),
'vhost' => env('RABBITMQ_VHOST', '/'),
],
],
'options' => [
'ssl_options' => [
'cafile' => env('RABBITMQ_SSL_CAFILE', null),
'local_cert' => env('RABBITMQ_SSL_LOCALCERT', null),
'local_key' => env('RABBITMQ_SSL_LOCALKEY', null),
'verify_peer' => env('RABBITMQ_SSL_VERIFY_PEER', true),
'passphrase' => env('RABBITMQ_SSL_PASSPHRASE', null),
],
'queue' => [
'job' => VladimirYuldashev\LaravelQueueRabbitMQ\Queue\Jobs\RabbitMQJob::class,
// 'job' => App\Jobs\CustomHandleJob::class,
],
],
/*
* Set to "horizon" if you wish to use Laravel Horizon.
*/
'worker' => env('RABBITMQ_WORKER', 'default'),
],
.env file (credential from instance detail in cloudamqp website):
RABBITMQ_HOST=snake-01.rmq2.cloudamqp.com
RABBITMQ_PORT=5672
RABBITMQ_USER=semvcmrb
RABBITMQ_PASSWORD=tjsOdrJN5V7hrapL5k3gEM8hpdYin9J
RABBITMQ_VHOST=semvcmrb