public static function consume($name)
    {
        $config = static::get($name);
        if (empty($config['consume'])) {
            throw new Exception('Missing consumer configuration (' . $name . ')');
        }

        $config = $config['consume'];
        $config += [
            'connection' => 'rabbit',
            'prefetchCount' => 1,
        ];

        if (!array_key_exists($name, static::$_consumers)) {
            $connection = ConnectionManager::get($config['connection']);
            static::$_consumers[$name] = $connection->queue($config['queue'], $config);
        }

        return static::$_consumers[$name];
    }