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

pann pa at zid.nu
Tue Dec 3 09:46:56 GMT 2013


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.


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.

More information about the rabbitmq-discuss mailing list