public static function createDefinedConnection(ConnectionDefinition $definition)
 {
     return new AMQPSocketConnection($definition->getHost(), $definition->getPort(), $definition->getUser(), $definition->getPassword(), $definition->getVirtualHost());
 }
 public static function createDefinedConnection(ConnectionDefinition $definition)
 {
     return new \AMQPConnection(['host' => $definition->getHost(), 'port' => $definition->getPort(), 'login' => $definition->getUser(), 'password' => $definition->getPassword(), 'vhost' => $definition->getVirtualHost()]);
 }