[rabbitmq-discuss] Is there a way to subscribe to all messages in a topic exchange
Simon MacMullen
simon at rabbitmq.com
Sun Mar 30 19:58:32 BST 2014
On 30/03/2014 1:49PM, Alvaro Videla wrote:
> On Sun, Mar 30, 2014 at 2:30 PM, rails <stammailbox at gmail.com> wrote:
>> My exchange is direct.
>> Can I bind a queue that will get all messages from the queue (as # in topic
>> exchange)?
>
> No, a queue will get the messages with a routing key that matches the
> binding key.
>
> If you need that kind of functionality then use a fanout exchange.
Note that you can use e2e bindings to combine a fanout and direct
exchange. Declare one of each, bind the fanout as source and the direct
as destination, and publish to the fanout. You can then bind queues to
the fanout to get everything, or the direct to get those with a certain
routing key.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, Pivotal
More information about the rabbitmq-discuss
mailing list