protected function _consumeQueue($queue, Mage_Core_Model_Store $store)
    {
        $this->_api = $this->_helper->getSdkAmqp($queue, $store);
        $this->_api->openConnection();
        $this->_api->getChannel()->basic_consume($this->_helper->_processQueueName($queue, $this->_coreHelper->getConfigModel($store)), '', false, false, false, false, array($this, 'process'));

        $timeout = $this->_helper->getConfigModel($store)->queueTimeout ? $this->_helper->getConfigModel($store)->queueTimeout : 5;
        while (count($this->_api->getChannel()->callbacks)) {
                try{
                    $this->_api->getChannel()->wait(null, false , $timeout);
                }catch(\PhpAmqpLib\Exception\AMQPTimeoutException $e){
                    $this->_api->getChannel()->close();
		    $this->_api->closeConnection();
                    break;
                }
        }

        return $this;
    }