[rabbitmq-discuss] durable queues on fanout exchange not durable

woodslee woodslee at 126.com
Tue Dec 3 10:02:04 GMT 2013


Hi pann

I think this is impossible.
If you declared a durable queue, whatever in producer or comsumer,once it is declared, it will be persistent in disk,and even you need not declare it later anymore.
I think you can view the state of the queue in rabbitMQ web UI. If it is durable, the flag will be the letter of "D"

----- Original Message ----- 
From: pann 
To: rabbitmq-discuss 
Sent: 2013-12-03, 17:46:56
Subject: [rabbitmq-discuss] durable queues on fanout exchange not durable


Hi,

I am having trouble getting my queues durable on my fanout exchange.
What I am trying to accomplish is the following:

* One producer, submitting messages to the exchange. The producer is not
aware of how many subscribers there will be.
* Multiple subscribers that creates their on queues. These queues should be
durable. If a subscriber needs to be restarted, the queue should survive in
order not to lose the messages.

The problem is that the queues do not survive the restart unless they are
also declared on the producer side. However that is not possible since the
producer is not aware of how many consumers there will be.

The queues are created on the consumer side like this:
$ch->queue_declare($queue, false, true, false, false);
$ch->exchange_declare($exchange, 'fanout', false, true, false);
$ch->queue_bind($queue, $exchange);

and I only declare the exchange on the producer side:
$ch->exchange_declare($exchange, 'fanout', false, true, false);

I am probably missing something rather simple, but I have not been able to
find the answer by googling the problem.

/PA






--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/durable-queues-on-fanout-exchange-not-durable-tp31781.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131203/ab286b4e/attachment.html>


More information about the rabbitmq-discuss mailing list