如何在RabbitMQ中使用wildacard队列名发送消费任务?

I have publisher, which send info into different queues in RabbitMQ

$this->_channel->queue_declare('qwe.w', FALSE, TRUE, FALSE, FALSE, FALSE);
$this->_channel->queue_declare('qwe.q', FALSE, TRUE, FALSE, FALSE, FALSE);
$this->_channel->basic_publish(
    $message, 
    '', 
    'qwe.q'
);
$this->_channel->basic_publish(
    $message, 
    '', 
    'qwe.w'
);

How I can consume them using wildcard queue name? Something like (code below doesn't work)

$this->_channel->basic_consume('qwe.#', '', FALSE, TRUE, FALSE, FALSE, 'function_name');

Important thing that I need - don't lose messages, even if consumer offline.

RabbitMQ does not support wildcard queue names. However, it does support Topic Exchanges, which give you effectively the same thing.

Under this topology, you would publish with the routing key you're already using, but you would publish to the topic exchange (there is a default exchange called amq.topic, or you can declare your own). Then, you create the queue for the subscriber. Finally, you bind the queue to the topic exchange using the wildcard routing mechanism that you're trying to use for the subscription.