Skip to content

Instantly share code, notes, and snippets.

@jumper423
Created June 23, 2017 10:28
Show Gist options
  • Save jumper423/f2b6978071b25e40d2c2c4a3d628979d to your computer and use it in GitHub Desktop.
Save jumper423/f2b6978071b25e40d2c2c4a3d628979d to your computer and use it in GitHub Desktop.
$di->setShared('queue', function () {
$queue = new \Lib\Queue(new \PhpAmqpLib\Connection\AMQPConnection(
'rabbitmq', #host - имя хоста, на котором запущен сервер RabbitMQ
5672, #port - номер порта сервиса, по умолчанию - 5672
'guest', #user - имя пользователя для соединения с сервером
'guest' #password
, '/'
, 60
));
return $queue;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment