protected function initConsumer($input) {

        // set up signal handlers first, in case something goes on during consumer constructor

        $handleSignals = extension_loaded('pcntl') && (!$input->getOption('without-signals'));
        if ($handleSignals && !function_exists('pcntl_signal')) {
            throw new \BadFunctionCallException("Function 'pcntl_signal' is referenced in the php.ini 'disable_functions' and can't be called.");
        }
        if ($handleSignals && !function_exists('pcntl_signal_dispatch')) {
            throw new \BadFunctionCallException("Function 'pcntl_signal_dispatch' is referenced in the php.ini 'disable_functions' and can't be called.");
        }
        if ($handleSignals) {
            pcntl_signal(SIGTERM, array($this, 'haltConsumer'));
            pcntl_signal(SIGINT, array($this, 'haltConsumer'));
            pcntl_signal(SIGHUP, array($this, 'restartConsumer'));
        }

        $this->consumer = $this->driver->getConsumer($input->getArgument('name'));

        if (!is_null($input->getOption('memory-limit')) && ctype_digit((string) $input->getOption('memory-limit')) && $input->getOption('memory-limit') > 0) {
            $this->consumer->setMemoryLimit($input->getOption('memory-limit'));
        }

        if (($routingKey = $input->getOption('route')) !== '') {
            $this->consumer->setRoutingKey($routingKey);
        }

        if (self::$label != '' && is_callable(array($this->consumer, 'setLabel'))) {
            $this->consumer->setLabel(self::$label);
        }

        if ($this->consumer instanceof \Kaliop\QueueingBundle\Queue\SignalHandlingConsumerInterface) {
            $this->consumer->setHandleSignals($handleSignals);
        }
    }