[rabbitmq-discuss] Key based access control

Simon MacMullen simon at rabbitmq.com
Thu May 2 16:37:30 BST 2013


On 02/05/13 16:19, Dmitry Andrianov wrote:
> My concerns are:
> 1. How will it work if we have say a million exchanges on a RabbitMQ
> server? Or even a few millions.

A few million is definitely a lot - the database records for all of them 
have to live in memory. But note that that is true of bindings and 
queues as well. An exchange is no more expensive than a binding, and 
less expensive than a queue (exception: federated exchanges).

> 2. To distribute the load we could use multiple RabbitMQ server without
> building a cluster.
> (Producers can be coded so they know to which RabbitMQ instance given
> client is connected).
> But it looks to me that exchange is a persistent entity - it won't cease
> to exist even when client goes away
> and its queue is destroyed. So if a client will be switching between our
> brokers, it will create same
> exchange on every one and eventually all servers will have full
> collection of exchanges. So it is not very scalable.
> Is there any way to automatically destroy unused exchanges?

Yes; set the exchange's autodelete field to true. Then the exchange will 
delete itself when the last queue is unbound from it.

> Or is it actually possible to verify how exactly a client binds to a
> exchange in the auth backend or other plugin?

I'm afraid not.

Cheers, Simon


-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list