@param string $queueName

@return QueueDriverInterface
181482
public function getQueueDriver($queueName)
    {
        $prefix = SmartboxIntegrationFrameworkExtension::QUEUE_DRIVER_PREFIX.$queueName;

        return $this->container->get($prefix);
    }
961170
public function pop($queueName = '')
    {

        if (!isset($this->queues[$queueName])) {
            return null;
        }

        if (!$this->queues[$queueName]) {
            return null;
        }

        return array_pop($this->queues[$queueName]);
    }
1254816
final public function normalizeDatabaseDriver(string $driverName)
    {
        if (is_string($driverName) && trim($driverName)) {
            $driverName = trim(strtolower($driverName));
            /**
             * switch to Doctrine fixed db
             * Aliases
             */
            $driverSchemeAliases = [
                'db2'        => 'ibm_db2',
                'drizzle'    => 'drizzle_pdo_mysql',
                'mssql'      => 'pdo_sqlsrv',
                'mysql'      => 'pdo_mysql',
                'mysql2'     => 'pdo_mysql', // Amazon RDS, for some weird reason
                'postgre'    => 'pdo_pgsql',
                'postgre_sql'=> 'pdo_pgsql',
                'postgres'   => 'pdo_pgsql',
                'postgresql' => 'pdo_pgsql',
                'pgsql'      => 'pdo_pgsql',
                'sqlite'     => 'pdo_sqlite',
                'sqlite3'    => 'pdo_sqlite',
                'oci'        => 'oci8',
                'pdo_oci'    => 'oci8',   # recommendation pdo_oci uses oci8
                'pdo_sqlsrv' => 'sqlsrv', #recommendation pdo_sqlsrv uses sqlsrv
            ];
            if (isset($driverSchemeAliases[$driverName])) {
                $driverName = $driverSchemeAliases[$driverName];
            }

            if (in_array($driverName, DriverManager::getAvailableDrivers())) {
                return $driverName;
            }
        }

        return false;
    }
1192820
protected function createQueue(AmqpContext $context, $queueName)
    {
        $queue = $context->createQueue($queueName);
        $context->declareQueue($queue);
        $context->purgeQueue($queue);

        return $queue;
    }
1101087
public function setDefaultQueue($name)
    {
        if (!$this->hasQueue($name)) {
            throw new \InvalidArgumentException(sprintf('Unknown queue "%s"', $name));
        }

        $this->defaultQueue = $name;

        return $this;
    }
994258
public function createQueue($queueName)
    {
        $channel = $this->getChannel();
        $channel->exchange_declare($this->exchange, 'direct', false, true, false);
        $channel->queue_declare($queueName, false, true, false, false);
        $channel->queue_bind($queueName, $this->exchange, $queueName);
    }
125981
public function getQueueInfo($queueName)
    {
        $result = [
            self::STATS_JOBS_READY    => $this->getJobCount($queueName, self::STATE_READY),
            self::STATS_JOBS_RESERVED => $this->getJobCount($queueName, self::STATE_RESERVED),
            self::STATS_JOBS_DELAYED  => $this->getJobCount($queueName, self::STATE_DELAYED),
            self::STATS_JOBS_BURIED   => $this->getJobCount($queueName, self::STATE_BURIED),
        ];

        $result[self::STATS_JOBS_TOTAL] = array_sum($result);
        $result[self::STATS_QUEUE_STOP] = $this->isStop($queueName);

        return $result;
    }
1166886
protected function createQueuedHandlerCallable($className, $method)
    {
        return function () use ($className, $method)
        {
            // Clone the given arguments for queueing.
            $arguments = array_map(function ($a)
            {
                return is_object($a) ? clone $a : $a;

            }, func_get_args());

            if (method_exists($className, 'queue')) {
                $this->callQueueMethodOnHandler($className, $method, $arguments);
            } else {
                $this->resolveQueue()->push('Nova\Events\CallQueuedHandler@call', array(
                    'class'  => $className,
                    'method' => $method,
                    'data'   => serialize($arguments),
                ));
            }
        };
    }
515748
public function findServerForQueue ($queueName, $serverTag) 
    {
        if (isset($this->serversByQueues[$queueName])) {
            return $this->serversByQueues[$queueName];
        }
        
        if (isset($this->serversByTags[$serverTag])) {
            return $this->serversByTags[$serverTag];
        }
        
        return null;
    }
877649
protected function runWorker($connection, $queue)
    {
        foreach (explode(',', $queue) as $tube) {
            $this->worker->eyeQueues[] = Queue::firstOrCreate(['connection' => $connection,
                                                               'tube' => $tube,
                                                               'driver' => $this->getDriverName($connection),
                                                               'healthy' => 1]);
        }

        return parent::runWorker($connection, $queue);
    }
503291
public function queue($name, array $options = [])
    {
        return $this->queues[$name] = (new QueueBuilder($this, $name))->options($options);
    }
62734
private function nextDriver($driverName)
    {
        $driverOrder = config('cache_fallback.fallback_order');
        if (in_array($driverName, $driverOrder, true) && last($driverOrder) !== $driverName) {
            $nextKey = array_search($driverName, $driverOrder, true) + 1;
            return $driverOrder[$nextKey];
        }
        return null;
    }
698192
public function renderQueue(Queue $queue)
    {
        $render = '';

        while ($method = $queue->dequeue(MethodInterface::BROWSER_PLATFORM)) {
            $render .= $this->renderMethod($method) . "\n";
        }

        return trim($render);
    }
782282
public function getPendingJobsCount($queue)
    {
        $driver_class = "\\Eyewitness\\Eye\\Queue\\Handlers\\".ucfirst(strtolower($queue->driver)).'Queue';

        if (! class_exists($driver_class)) {
            $this->eye->logger()->error('Queue Driver does not exist', $driver_class);
            return 0;
        }

        try {
            $qm = app(QueueManager::class)->connection($queue->connection);

            return (new $driver_class($qm, $queue))->pendingJobsCount($queue->tube);
        } catch (Exception $e) {
            $this->eye->logger()->debug('Unable to find Queue connection', ['exception' => $e->getMessage(), 'connection' => $queue->connection]);
        }

        return -1;
    }
128763
public function createQueue($queueName)
    {
        if ($this->queueExists($queueName)) {
            return;
        }

        $parameters = [
            'QueueName' => $queueName,
        ];

        if ($this->isFifoQueue($queueName)) {
            $parameters['Attributes'] = [
                'FifoQueue' => 'true',
            ];
        }

        $result = $this->sqs->createQueue($parameters);

        $this->queueUrls[$queueName] = $result['QueueUrl'];
    }
1154880
public function queue(Queue $queue)
    {
        if (isset($this->delay)) {
            return $this->later($this->delay, $queue);
        }

        $connection = property_exists($this, 'connection') ? $this->connection : null;

        $queueName = property_exists($this, 'queue') ? $this->queue : null;

        return $queue->connection($connection)->pushOn(
            $queueName ?: null, new SendQueuedMailable($this)
        );
    }
152427
public function getDriverName($conn = null)
    {
        $conn = $conn ?: $this->getConnectionName();

        return $this->config->get('queue.' . $conn . '.driver', 'sync');
    }